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].}
- Source Edit
method onTopicSubscription(g: GossipSub; topic: string; subscribed: bool) {. ...raises: [], tags: [RootEffect].}
- 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, SendingFuturesTable, 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, broadcast, subscribe, sendSubs, PubSubObserver, TopicHandler, codec=, removeObserver, libp2p_pubsub_received_subscriptions, libp2p_pubsub_received_unsubscriptions, libp2p_pubsub_broadcast_prune, PubSubPeer, libp2p_pubsub_received_ihave, getOrCreatePeer, libp2p_pubsub_messages_rebroadcasted, cancellableBroadcast, ValidationResult, DefaultMaxIncomingStreams, rpcHandler, libp2p_pubsub_received_prune, KnownLibP2PTopicsSeq, handleData, LPProtoHandler, ValidatorHandler, libp2p_pubsub_received_graft, libp2p_pubsub_broadcast_iwant, removeValidator, validate, new, TopicPair, send, libp2p_pubsub_broadcast_graft, subscribePeer, init, unsubscribe, MsgIdProvider, libp2p_pubsub_broadcast_ihave, init, maxIncomingStreams=, libp2p_pubsub_received_iwant, codec, maxIncomingStreams, unsubscribePeer, PubSub, unsubscribe, addObserver, libp2p_pubsub_broadcast_messages, SubscriptionValidator, unsubscribeAll, start, initPubSub, libp2p_pubsub_messages_published, handleConn, libp2p_pubsub_broadcast_unsubscriptions, onTopicSubscription, updateMetrics, libp2p_pubsub_broadcast_subscriptions, InitializationError, libp2p_pubsub_received_messages, addValidator, KnownLibP2PTopics, onPubSubPeerEvent, publish, LPProtocol, stop