Gossip based publishing
Procs
proc addDirectPeer(g: GossipSub; id: PeerId; addrs: seq[MultiAddress]): Future[ void] {.stackTrace: false, ...gcsafe, raises: [], 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 rateLimit(g: GossipSub; peer: PubSubPeer; rpcMsgOpt: Opt[RPCMsg]; msgSize: int): Future[void] {.stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], tags: [RootEffect].}
- 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 getOrCreatePeer(g: GossipSub; peerId: PeerId; protos: seq[string]): PubSubPeer {. ...raises: [], tags: [RootEffect, WriteIOEffect, TimeEffect].}
- Source Edit
method initPubSub(g: GossipSub) {....raises: [InitializationError], raises: [], tags: [].}
- Source Edit
method onNewPeer(g: GossipSub; peer: PubSubPeer) {....raises: [], tags: [RootEffect, WriteIOEffect, TimeEffect].}
- 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: [], raises: [], tags: [RootEffect].}
- Source Edit
method rpcHandler(g: GossipSub; peer: PubSubPeer; data: seq[byte]): Future[void] {. stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], tags: [RootEffect].}
- Source Edit
method start(g: GossipSub): Future[void] {.stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], tags: [RootEffect].}
- Source Edit
method stop(g: GossipSub): Future[void] {.stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], tags: [RootEffect].}
- Source Edit
method unsubscribePeer(g: GossipSub; peer: PeerId) {....raises: [], tags: [RootEffect, WriteIOEffect, TimeEffect].}
- handle peer disconnects Source Edit
Exports
-
GossipSubD, IHaveMaxLength, BackoffSlackTime, GossipSubHistoryLength, GossipBackoffPeriod, PeerStats, IHavePeerBudget, GossipSubCodec, GossipSub, GossipSubParams, GossipSubFanoutTTL, GossipSubCodec_10, GossipSubDlo, RoutingRecordsHandler, GossipSubHistoryGossip, GossipSubHeartbeatInterval, MeshMetrics, BackoffTable, RoutingRecordsPair, TopicInfo, ValidationSeenTable, GossipSubDhi, PingsPeerBudget, TopicParams, updateScores, libp2p_gossipsub_peers_rate_limit_hits, disconnectPeer, init, disconnectIfBadScorePeer, withPeerStats, byScore, punishInvalidMessage, rewardDelivered, scoringHeartbeat, addCapped, getGossipPeers, handleIDontWant, replenishFanout, rebalanceMesh, dropFanoutPeers, handleIWant, pruned, handleBackingOff, peerExchangeList, handleGraft, grafted, handleIHave, handlePrune, heartbeat, maxIncomingStreams=, codec=, libp2p_pubsub_received_subscriptions, libp2p_pubsub_broadcast_unsubscriptions, libp2p_pubsub_messages_rebroadcasted, libp2p_pubsub_received_graft, removeValidator, DefaultMaxIncomingStreams, send, libp2p_pubsub_received_prune, ValidatorHandler, libp2p_pubsub_broadcast_iwant, init, unsubscribe, validate, removeObserver, libp2p_pubsub_broadcast_graft, libp2p_pubsub_received_unsubscriptions, sendSubs, codec, MsgIdProvider, PubSub, SubscriptionValidator, start, onTopicSubscription, updateMetrics, libp2p_pubsub_broadcast_subscriptions, addValidator, KnownLibP2PTopics, handleConn, onPubSubPeerEvent, publish, LPProtocol, ValidationResult, broadcast, subscribe, addObserver, PubSubObserver, libp2p_pubsub_broadcast_prune, PubSubPeer, unsubscribePeer, rpcHandler, init, KnownLibP2PTopicsSeq, handleData, LPProtoHandler, libp2p_pubsub_received_ihave, new, TopicPair, libp2p_pubsub_broadcast_ihave, subscribePeer, libp2p_pubsub_received_iwant, maxIncomingStreams, libp2p_pubsub_broadcast_messages, initPubSub, libp2p_pubsub_messages_published, TopicHandler, unsubscribeAll, InitializationError, libp2p_pubsub_received_messages, unsubscribe, getOrCreatePeer, stop