Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewNilConfigurer ¶ added in v0.1.6
func NewNilConfigurer() config.PubsubConfigurer
NewNilConfigurer creates an empty config.PubsubConfigurer
func NewReportingTracer ¶ added in v0.1.4
func NewReportingTracer() pubsublibp2p.EventTracer
newTracer creates an instance of psTracer
func NewSubFilter ¶ added in v0.1.3
func NewSubFilter(pattern string, limit int) (libpubsub.SubscriptionFilter, error)
NewSubFilter creates a new subscription filter that accepts topics of the given pattern
Types ¶
type PubsubHandler ¶ added in v0.1.2
type PubsubHandler func(*pubsublibp2p.Message)
type PubsubService ¶
type PubsubService interface { Pubsub() *pubsublibp2p.PubSub Publish(topicName string, data []byte) error GetTopic(topicName string) *pubsublibp2p.Topic GetSubscription(topicName string) *pubsublibp2p.Subscription UnSubscribe(topicName string) error Subscribe(topicName string, handler PubsubHandler, bufferSize int) error }
func NewPubsubService ¶
func NewPubsubService(ctx context.Context, ps *pubsublibp2p.PubSub, configurer config.PubsubConfigurer) PubsubService
type TopicConfigurer ¶
type TopicConfigurer func(topic *pubsublibp2p.Topic)
Click to show internal directories.
Click to hide internal directories.