github.com/qri-io/qri@v0.10.1-0.20220104210721-c771715036cb/event/p2p.go (about) 1 package event 2 3 var ( 4 // ETP2PGoneOnline occurs when a p2p node opens up for peer-2-peer connections 5 // payload will be []multiaddr.Addr, the listening addresses of this peer 6 ETP2PGoneOnline = Type("p2p:GoneOnline") 7 // ETP2PGoneOffline occurs when a p2p node has finished disconnecting from 8 // a peer-2-peer network 9 // payload will be nil 10 ETP2PGoneOffline = Type("p2p:GoneOffline") 11 // ETP2PQriPeerConnected fires whenever a peer-2-peer connection that 12 // supports the qri protocol is established 13 // payload is a *profile.Profile 14 // subscribers cannot block the publisher 15 ETP2PQriPeerConnected = Type("p2p:QriPeerConnected") 16 // ETP2PQriPeerDisconnected fires whenever a qri peer-2-peer connection 17 // is closed 18 // payload is a *profile.Profile 19 // a nil payload means we never successfully obtained the peer's profile 20 // information 21 // subscribers cannot block the publisher 22 ETP2PQriPeerDisconnected = Type("p2p:QriPeerDisconnected") 23 // ETP2PPeerConnected occurs after any peer has connected to this node 24 // payload will be a libp2p.peerInfo 25 ETP2PPeerConnected = Type("p2p:PeerConnected") 26 // ETP2PPeerDisconnected occurs after any peer has connected to this node 27 // payload will be a libp2p.peerInfo 28 ETP2PPeerDisconnected = Type("p2p:PeerDisconnected") 29 // ETP2PMessageReceived fires whenever the p2p protocol receives a message 30 // from a Qri peer 31 // payload will be a p2p.Message 32 ETP2PMessageReceived = Type("p2p:MessageReceived") 33 )