async

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetermineDecoder added in v0.2.0

func DetermineDecoder(contentType string) (encoding.DecodeRawFunc, error)

DetermineDecoder determines the decoder based on the content type.

Types

type Message added in v0.2.0

type Message struct {
	Data []byte
	// contains filtered or unexported fields
}

Message definition of a async message.

func NewMessage added in v0.2.0

func NewMessage(d []byte, dec encoding.DecodeRawFunc) *Message

NewMessage creates a new message.

func (*Message) Decode added in v0.2.0

func (m *Message) Decode(v interface{}) error

Decode the raw data.

type MockProcessor added in v0.2.0

type MockProcessor struct {
}

MockProcessor definition for test usage.

func (MockProcessor) Process added in v0.2.0

func (mp MockProcessor) Process(ctx context.Context, msg *Message) error

Process a message for testing purposes.

type ProcessorFunc added in v0.3.1

type ProcessorFunc func(context.Context, *Message) error

ProcessorFunc definition of a async processor.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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