streamclient

package
v2.4.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2019 License: ISC Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Unknown represents an unknown streamclient implementation.
	Unknown Type = "unknown"

	// Inmem represents the in-memory streamclient implementation.
	Inmem = "inmem"

	// Kafka represents the Kafka streamclient implementation.
	Kafka = "kafka"

	// Standardstream represents the Standardstream streamclient implementation.
	Standardstream = "standardstream"
)

Variables

View Source
var ErrUnknownConsumerClient = errors.New("unable to determine required consumer streamclient")

ErrUnknownConsumerClient is returned when the desired stream client cannot be inferred from the environment context.

View Source
var ErrUnknownProducerClient = errors.New("unable to determine required producer streamclient")

ErrUnknownProducerClient is returned when the desired stream client cannot be inferred from the environment context.

Functions

func NewConsumer

func NewConsumer(options ...streamconfig.Option) (stream.Consumer, error)

NewConsumer returns a new streamclient consumer, based on the context from which this function is called.

func NewProducer

func NewProducer(options ...streamconfig.Option) (stream.Producer, error)

NewProducer returns a new streamclient producer, based on the context from which this function is called.

func TestMessageFromConsumer

func TestMessageFromConsumer(tb testing.TB, consumer stream.Consumer) stream.Message

TestMessageFromConsumer returns a single message, consumed from the provided consumer. It has a built-in timeout mechanism to prevent the test from getting stuck.

Types

type Type

type Type string

Type represents the streamclient implementation type.

func (Type) String

func (t Type) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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