local

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAlreadySubscribed = errors.New("topic is already subscribed")
View Source
var ErrNotSubscribed = errors.New("topic is not subscribed")

Functions

This section is empty.

Types

type Local

type Local struct {
	// contains filtered or unexported fields
}

Local is a simple implementation of the transport.Transport interface using local channels.

func New

func New(buffer int) *Local

New returns a new instance of the Local structure.

func (*Local) Broadcast

func (l *Local) Broadcast(topic string, message transport.Message) error

Broadcast implements the transport.Transport interface.

func (*Local) Close

func (l *Local) Close() error

Close implements the transport.Transport interface.

func (*Local) Subscribe

func (l *Local) Subscribe(topic string, typ transport.Message) error

Subscribe implements the transport.Transport interface.

func (*Local) Unsubscribe

func (l *Local) Unsubscribe(topic string) error

Unsubscribe implements the transport.Transport interface.

func (*Local) WaitFor

func (l *Local) WaitFor(topic string) chan transport.ReceivedMessage

WaitFor implements the transport.Transport interface.

Jump to

Keyboard shortcuts

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