messaging

package
v0.0.0-...-1e04dac Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2018 License: GPL-3.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer

type Consumer interface {
	Run(ctx context.Context) error
}

Consumer is an abstraction for consumming messages for messaging pipeline.

func NewConsumer

func NewConsumer(ctx context.Context, conf configuration.Consumption,
	logger logging.Logger,
	handler func(*bus.Message) (reply interface{}, err error)) (Consumer, error)

NewConsumer returns a valid event consumer.

type Emitter

type Emitter interface {
	Emit(ctx context.Context, payload interface{}) error
}

Emitter sends message through messaging pipeline.

func NewEmitter

func NewEmitter(ctx context.Context, conf configuration.Emission,
	logger logging.Logger) (Emitter, error)

NewEmitter creates a valid emitter thrrough nsq.

Jump to

Keyboard shortcuts

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