consumers

package
v0.0.0-...-081ecb4 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2020 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadMessage = errors.New("bad message")
View Source
var ErrPermanent = errors.New("permanent error")
View Source
var ErrRetryLater = errors.New("retry later")

Functions

This section is empty.

Types

type Consumer

type Consumer interface {
	ConsumeMessage(ctx context.Context, message []byte) error
	ResultLogger() ResultLogger
}

type Multiplexer

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

func NewMultiplexer

func NewMultiplexer() *Multiplexer

func (*Multiplexer) ConsumeMessage

func (m *Multiplexer) ConsumeMessage(ctx context.Context, message []byte) error

func (*Multiplexer) RegisterConsumer

func (m *Multiplexer) RegisterConsumer(id string, consumer Consumer) error

func (Multiplexer) ResultLogger

func (m Multiplexer) ResultLogger() ResultLogger

func (*Multiplexer) SetResultLogger

func (m *Multiplexer) SetResultLogger(logger ResultLogger)

type ReflectConsumer

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

func NewReflectConsumer

func NewReflectConsumer(handler interface{}, timeout time.Duration, df *redsync.Redsync) (*ReflectConsumer, error)

func (ReflectConsumer) ConsumeMessage

func (c ReflectConsumer) ConsumeMessage(ctx context.Context, message []byte) error

func (ReflectConsumer) ResultLogger

func (c ReflectConsumer) ResultLogger() ResultLogger

type ResultLogger

type ResultLogger func(err error)

Jump to

Keyboard shortcuts

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