We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 878b651 + defb415 commit a26ad00Copy full SHA for a26ad00
core/event/network.go
@@ -0,0 +1,16 @@
1
+package event
2
+
3
+import (
4
+ "github.com/libp2p/go-libp2p-core/network"
5
+ "github.com/libp2p/go-libp2p-core/peer"
6
+)
7
8
+// EvtPeerConnectednessChanged should be emitted every time we form a connection with a peer or drop our last
9
+// connection with the peer. Essentially, it is emitted in two cases:
10
+// a) We form a/any connection with a peer.
11
+// b) We go from having a connection/s with a peer to having no connection with the peer.
12
+// It contains the Id of the remote peer and the new connectedness state.
13
+type EvtPeerConnectednessChanged struct {
14
+ Peer peer.ID
15
+ Connectedness network.Connectedness
16
+}
0 commit comments