Documentation ¶
Overview ¶
pubsub a publish subscribe client for IPFS PubSub
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Interface ¶
type Interface interface { // Subscribe Subscribes to a topic Subscribe(ctx context.Context, topic string) (Subscription, error) // Unsubscribe Unsubscribe from a topic Unsubscribe(topic string) error // Close Unsubscribe from all topics Close() error // Publish Posts a new message on a topic Publish(ctx context.Context, topic string, message []byte) error }
type MessageEvent ¶
MessageEvent Indicates a new message posted on a pubsub topic
type Subscription ¶
type Subscription interface { events.EmitterInterface io.Closer }
Subscription is a pub sub subscription to a topic
func NewSubscription ¶
func NewSubscription(ctx context.Context, ipfs coreapi.CoreAPI, topic string, cancel context.CancelFunc, opts *Options) (Subscription, error)
NewSubscription Creates a new pub sub subscription
Directories ¶
Path | Synopsis |
---|---|
oneonone is a pubsub channel for communication between two peers
|
oneonone is a pubsub channel for communication between two peers |
peermonitor is a package for watching peers on a pub sub channel
|
peermonitor is a package for watching peers on a pub sub channel |
Click to show internal directories.
Click to hide internal directories.