Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
Message defines the common interface for go-filecoin message consumers. It's a subset of the go-libp2p-pubsub/pubsub.go Message type.
type Subscription ¶
type Subscription interface { // Topic returns this subscription's topic name Topic() string // Next returns the next message from this subscription Next(ctx context.Context) (Message, error) // Cancel cancels this subscription Cancel() }
Subscription is a handle to a pubsub subscription. This matches part of the interface to a libp2p.pubsub.Subscription.
type Topic ¶ added in v1.4.0
type Topic struct {
// contains filtered or unexported fields
}
Topic publishes and subscribes to a libp2p pubsub topic
func (*Topic) Publish ¶ added in v1.4.0
Publish publishes to a pubsub topic. It blocks until there is at least one peer on the mesh that can receive the publish.
func (*Topic) Subscribe ¶ added in v1.4.0
func (t *Topic) Subscribe() (Subscription, error)
Subscribe subscribes to a pubsub topic
Click to show internal directories.
Click to hide internal directories.