memorybus

package
v0.0.0-...-4f0d0f2 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemoryBus

type InMemoryBus struct {
	Subscriptions StreamSubscriptionCollection
	// contains filtered or unexported fields
}

func New

func New() *InMemoryBus

func (*InMemoryBus) Publish

func (bus *InMemoryBus) Publish(topic string, stream streams.Readable) error

func (*InMemoryBus) SetLogger

func (bus *InMemoryBus) SetLogger(logger log.Logger)

func (*InMemoryBus) Start

func (bus *InMemoryBus) Start() <-chan bool

func (*InMemoryBus) Subscribe

func (bus *InMemoryBus) Subscribe(topics []string, fn streams.SubscribeFunc) error

type StreamSubscription

type StreamSubscription struct {
	Topics           []string
	Ready            chan bool
	SubscribeFn      streams.SubscribeFunc
	PublishedStreams chan streams.Readable
	ReadyStreams     int
}

func NewStreamSubscription

func NewStreamSubscription(topics []string, subscribeFn streams.SubscribeFunc) *StreamSubscription

type StreamSubscriptionCollection

type StreamSubscriptionCollection []*StreamSubscription

Jump to

Keyboard shortcuts

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