streamclient

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2018 License: ISC Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConsumer

func NewConsumer(options ...func(sc *standardstream.Client, kc *kafka.Client)) (stream.Consumer, error)

NewConsumer returns a new consumer, based on the environment in which the function is called.

If data is being piped from Stdin, the consumer client will be standardstream. Otherwise it will use the Kafka client.

func NewConsumerAndProducer

func NewConsumerAndProducer(options ...func(sc *standardstream.Client, kc *kafka.Client)) (stream.Consumer, stream.Producer, error)

NewConsumerAndProducer returns the values of `NewConsumer` and `NewProducer`, or an error if any of the two returns an error.

See the two function descriptions for more details.

func NewInmemClient

func NewInmemClient(options ...func(*inmem.Client)) stream.Client

NewInmemClient returns a new inmem client.

func NewKafkaClient

func NewKafkaClient(options ...func(*kafka.Client)) stream.Client

NewKafkaClient returns a new Kafka client.

func NewProducer

func NewProducer(options ...func(sc *standardstream.Client, kc *kafka.Client)) (stream.Producer, error)

NewProducer returns a new producer, based on the environment in which the function is called.

The producer will be of the Kafka client by default, unless the `DRY_RUN` environment variable is defined, in which case it will be from the standardstream client.

func NewStandardStreamClient

func NewStandardStreamClient(options ...func(*standardstream.Client)) stream.Client

NewStandardStreamClient returns a new standardstream client.

Types

type Client

type Client struct {
	Standardstream *standardstream.Client
	Kafka          *kafka.Client
	Inmem          *inmem.Client
}

Client is the overarching configuration for all stream clients.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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