Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct { // ConsumerFD is the file descriptor to consume messages from. If undefined, // the `os.Stdin` descriptor will be used. ConsumerFD *os.File // ProducerFD is the file descriptor to produce messages to. If undefined, the // `os.Stdout` descriptor will be used. ProducerFD io.Writer // Logger is the configurable logger instance to log messages from this // streamclient. If left undefined, a noop logger will be used. Logger *zap.Logger }
Client provides access to the streaming capabilities.
func (*Client) NewConsumer ¶
NewConsumer returns a consumer that can iterate over messages on a stream.
func (*Client) NewConsumerAndProducer ¶
NewConsumerAndProducer is a convenience method that returns both a consumer and a producer, with a single function call.
func (*Client) NewProducer ¶
NewProducer returns a producer that outputs messages to stdout.
type Consumer ¶
type Consumer struct {
// contains filtered or unexported fields
}
Consumer implements the stream.Consumer interface for standardstream.
Click to show internal directories.
Click to hide internal directories.