bus

package
v5.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EventChanBufferLength = 10

EventChanBufferLength is the number of unhandled events which can be queued to the event channel buffer before further events are lost.

Functions

This section is empty.

Types

type Bus

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

Bus provides an ari.Bus interface to NATS

func New

func New(prefix string, nc *nats.EncodedConn, log log15.Logger) *Bus

New returns a new Bus

func (*Bus) Close

func (b *Bus) Close()

Close implements ari.Bus

func (*Bus) Send

func (b *Bus) Send(e ari.Event)

Send implements ari.Bus

func (*Bus) Subscribe

func (b *Bus) Subscribe(key *ari.Key, n ...string) ari.Subscription

Subscribe implements ari.Bus

type Subscription

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

Subscription represents an ari.Subscription over NATS

func (*Subscription) Cancel

func (s *Subscription) Cancel()

Cancel destroys the subscription

func (*Subscription) Events

func (s *Subscription) Events() <-chan ari.Event

Events returns the channel on which events from this subscription will be sent

Jump to

Keyboard shortcuts

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