Documentation ¶
Index ¶
- func NewConsumer(options ...func(sc *standardstream.Client, kc *kafka.Client)) (stream.Consumer, error)
- func NewConsumerAndProducer(options ...func(sc *standardstream.Client, kc *kafka.Client)) (stream.Consumer, stream.Producer, error)
- func NewInmemClient(options ...func(*inmem.Client)) stream.Client
- func NewKafkaClient(options ...func(*kafka.Client)) stream.Client
- func NewProducer(options ...func(sc *standardstream.Client, kc *kafka.Client)) (stream.Producer, error)
- func NewStandardStreamClient(options ...func(*standardstream.Client)) stream.Client
- type Client
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 ¶
NewInmemClient returns a new inmem client.
func NewKafkaClient ¶
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.