dispatcher

package
v0.0.0-...-3fe642c Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNack returned by a filter if the message should not be handled and
	// returned back to the queue
	ErrNack = errors.New("Message filtered and not handled")
	// ErrAck returned by a filter if a message won't be handled and if it should
	// not be returned back to the queue. An example of this would be for a
	// message that fails authentication.
	ErrAck = errors.New("Message filtered, but was handled")
)

Functions

This section is empty.

Types

type Filter

type Filter interface {
	Filter(msg bus.Message) error
}

Filter message preprocessor.

type Runnable

type Runnable interface {
	Run(subscribers ...eventmanager.Subscriber) error
	RunAsync(subscribers ...eventmanager.Subscriber) chan error
	io.Closer
}

Runnable components have concurrent main loops that can be canceled by the Close method and can be block by receiving on Run's returned error channel

func NewBusDispatcher

func NewBusDispatcher(
	mq bus.MessageQueue,
	eventManager eventmanager.EventManager,
	filters ...Filter,
) Runnable

NewBusDispatcher initializes a new dispatcher

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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