Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

add events for identify #26

Merged
merged 2 commits into from
Jun 26, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions event/identify.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package event

import "github.com/libp2p/go-libp2p-core/peer"

// EvtPeerInitialIdentificationCompleted is emitted when the initial identification round for a peer is completed.
type EvtPeerInitialIdentificationCompleted struct {
// Peer is the ID of the peer whose identification succeeded.
Peer peer.ID
}

// EvtPeerInitialIdentificationFailed is emitted when the initial identification round for a peer failed.
type EvtPeerInitialIdentificationFailed struct {
// Peer is the ID of the peer whose identification failed.
Peer peer.ID
// Reason is the reason why identification failed.
Reason error
}