Enum libp2p_gossipsub::GossipsubEvent [−][src]
pub enum GossipsubEvent {
Message {
propagation_source: PeerId,
message_id: MessageId,
message: GossipsubMessage,
},
Subscribed {
peer_id: PeerId,
topic: TopicHash,
},
Unsubscribed {
peer_id: PeerId,
topic: TopicHash,
},
GossipsubNotSupported {
peer_id: PeerId,
},
}
Expand description
Event that can be emitted by the gossipsub behaviour.
Variants
A message has been received.
Fields of Message
propagation_source: PeerId
The peer that forwarded us this message.
message_id: MessageId
The MessageId
of the message. This should be referenced by the application when
validating a message (if required).
message: GossipsubMessage
The decompressed message itself.
A remote subscribed to a topic.
Fields of Subscribed
A remote unsubscribed from a topic.
Fields of Unsubscribed
A peer that does not support gossipsub has connected.
Fields of GossipsubNotSupported
peer_id: PeerId