v2

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broadcaster

type Broadcaster interface {
	// Register a new channel to receive broadcasts from a pubsubtopic
	Register(topic *string, newch chan<- *protocol.Envelope)
	// Register a new channel to receive broadcasts from a pubsub topic and return a channel to wait until this operation is complete
	WaitRegister(topic *string, newch chan<- *protocol.Envelope) doneCh
	// Unregister a channel so that it no longer receives broadcasts from a pubsub topic
	Unregister(topic *string, newch chan<- *protocol.Envelope)
	// Unregister a subscriptor channel and return a channel to wait until this operation is done
	WaitUnregister(topic *string, newch chan<- *protocol.Envelope) doneCh
	// Shut this broadcaster down.
	Close()
	// Submit a new object to all subscribers
	Submit(*protocol.Envelope)
}

The Broadcaster interface describes the main entry points to broadcasters.

func NewBroadcaster

func NewBroadcaster(buflen int) Broadcaster

NewBroadcaster creates a Broadcaster with an specified length It's used to register subscriptors that will need to receive an Envelope containing a WakuMessage

Directories

Path Synopsis
pb
rln

Jump to

Keyboard shortcuts

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