bus

package
v2.0.0-pre0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2017 License: Apache-2.0 Imports: 5 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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