pubsub

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const PUBSUB_PROTOCOL = "/meshsub/1.1.0"

Variables

This section is empty.

Functions

func AddPeer added in v0.3.0

func AddPeer(id peer.ID)

Adds a peer ID to the GossipSubRouter

func Get

func Get() *pubsub.PubSub

func GetOrCreateTopic added in v0.3.0

func GetOrCreateTopic(topicName string) (*p2ppubsub.Topic, error)

func New

func New(ctx context.Context, h host.Host) (*pubsub.PubSub, error)

Start the pubsub service. If ctx is nil a background context is used. n is the libp2p host.

func RemovePeer added in v0.3.0

func RemovePeer(id peer.ID)

Removes a peer ID from the GossipSubRouter

func SetEoughPeers added in v0.3.0

func SetEoughPeers(t string, peerno int)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL