Gossip based publishing
Procs
proc addDirectPeer(g: GossipSub; id: PeerId; addrs: seq[MultiAddress]): Future[ void] {.stackTrace: false, ...gcsafe, raises: [], raises: [], tags: [RootEffect].}
- Source Edit
proc handleSubscribe(g: GossipSub; peer: PubSubPeer; topic: string; subscribe: bool) {....raises: [], tags: [RootEffect].}
- Source Edit
proc init(_: type[GossipSubParams]): GossipSubParams {....raises: [].}
- Source Edit
proc validateParameters(parameters: GossipSubParams): Result[void, cstring] {. ...raises: [], tags: [].}
- Source Edit
proc validateParameters(parameters: TopicParams): Result[void, cstring] {. ...raises: [], tags: [].}
- Source Edit
Methods
method initPubSub(g: GossipSub) {....raises: [Defect, InitializationError], raises: [], tags: [].}
- Source Edit
method onPubSubPeerEvent(p: GossipSub; peer: PubSubPeer; event: PubSubPeerEvent) {. ...gcsafe, raises: [], tags: [RootEffect, WriteIOEffect, TimeEffect].}
- Source Edit
method onTopicSubscription(g: GossipSub; topic: string; subscribed: bool) {. ...raises: [], tags: [RootEffect, WriteIOEffect, TimeEffect].}
- Source Edit
method publish(g: GossipSub; topic: string; data: seq[byte]): Future[int] {. stackTrace: false, ...gcsafe, raises: [], raises: [], tags: [RootEffect].}
- Source Edit
method rpcHandler(g: GossipSub; peer: PubSubPeer; rpcMsg: RPCMsg): Future[void] {. stackTrace: false, ...gcsafe, raises: [], raises: [], tags: [RootEffect].}
- Source Edit
method start(g: GossipSub): Future[void] {.stackTrace: false, ...gcsafe, raises: [], raises: [], tags: [RootEffect].}
- Source Edit
method stop(g: GossipSub): Future[void] {.stackTrace: false, ...gcsafe, raises: [], raises: [], tags: [RootEffect].}
- Source Edit
method unsubscribePeer(g: GossipSub; peer: PeerId) {....raises: [], tags: [WriteIOEffect, TimeEffect].}
- handle peer disconnects Source Edit
Exports
-
GossipBackoffPeriod, BackoffSlackTime, GossipSubCodec_10, GossipSubHistoryGossip, GossipSubDlo, IHaveMaxLength, TopicInfo, ValidationSeenTable, IHavePeerBudget, IWantPeerBudget, RoutingRecordsHandler, GossipSubCodec, GossipSubD, GossipSubDhi, RoutingRecordsPair, GossipSubHeartbeatInterval, PeerStats, GossipSubHistoryLength, GossipSubFanoutTTL, BackoffTable, TopicParams, GossipSub, MeshMetrics, GossipSubParams, updateScores, init, addCapped, withPeerStats, byScore, punishInvalidMessage, rewardDelivered, scoringHeartbeat, getGossipPeers, replenishFanout, rebalanceMesh, dropFanoutPeers, handleIWant, pruned, handleBackingOff, peerExchangeList, handleGraft, grafted, handleIHave, handlePrune, heartbeat, sendSubs, MsgIdProvider, onTopicSubscription, init, unsubscribe, PubSubObserver, TopicHandler, codec=, removeObserver, send, libp2p_pubsub_received_subscriptions, initPubSub, subscribe, libp2p_pubsub_broadcast_prune, PubSubPeer, libp2p_pubsub_broadcast_ihave, libp2p_pubsub_received_iwant, codec, unsubscribe, getOrCreatePeer, libp2p_pubsub_messages_rebroadcasted, SubscriptionValidator, removeValidator, PubSub, libp2p_pubsub_received_unsubscriptions, start, broadcast, rpcHandler, libp2p_pubsub_received_prune, KnownLibP2PTopicsSeq, libp2p_pubsub_messages_published, LPProtoHandler, ValidationResult, ValidatorHandler, handleConn, libp2p_pubsub_broadcast_unsubscriptions, libp2p_pubsub_received_graft, libp2p_pubsub_broadcast_iwant, init, updateMetrics, libp2p_pubsub_broadcast_subscriptions, InitializationError, libp2p_pubsub_received_messages, unsubscribePeer, addObserver, addValidator, libp2p_pubsub_received_ihave, handleData, validate, unsubscribeAll, libp2p_pubsub_broadcast_messages, KnownLibP2PTopics, TopicPair, onPubSubPeerEvent, libp2p_pubsub_broadcast_graft, publish, LPProtocol, stop, subscribePeer