# Packages
No description provided by the author
Package kafkatest provides mock objects for high level kafka interface.
Package proto provides kafka binary protocol implementation.
# Functions
Dial connects to any node from a given list of kafka addresses and after successful metadata fetch, returns broker.
Merge is merging consume result of any number of consumers into single stream and expose them through returned multiplexer.
NewBrokerConf returns the default broker configuration.
NewConsumerConf returns the default consumer configuration.
NewHashProducer wraps given producer and return DistributingProducer that publish messages to kafka, computing partition number from message key hash, using fnv hash and [0, numPartitions) range.
NewOffsetCoordinatorConf returns default OffsetCoordinator configuration.
NewProducerConf returns a default producer configuration.
NewRandomProducer wraps given producer and return DistributingProducer that publish messages to kafka, randomly picking partition number from range [0, numPartitions).
NewRoundRobinProducer wraps given producer and return DistributingProducer that publish messages to kafka, choosing destination partition from cycle build from [0, numPartitions) range.
# Constants
StartOffsetNewest configures the consumer to fetch messages produced after creating the consumer.
StartOffsetOldest configures the consumer to fetch starting from the oldest message available.
# Variables
ErrClosed is returned as result of any request made using closed connection.
ErrMxClosed is returned as a result of closed multiplexer consumption.
ErrNoData is returned by consumers on Fetch when the retry limit is set and exceeded.
# Structs
Broker is an abstract connection to kafka cluster, managing connections to all kafka nodes.
BrokerConf represents the configuration of a broker.
ConsumerConf represents the configuration of a consumer.
Mx is multiplexer combining into single stream number of consumers.
OffsetCoordinatorConf represents the configuration of an offset coordinator.
ProducerConf represents the configuration of a producer.
# Interfaces
BatchConsumer is the interface that wraps the ConsumeBatch method.
Client is the interface implemented by Broker.
Consumer is the interface that wraps the Consume method.
DistributingProducer is the interface similar to Producer, but never require to explicitly specify partition.
Logger is general logging interface that can be provided by popular logging frameworks.
OffsetCoordinator is the interface which wraps the Commit and Offset methods.
Producer is the interface that wraps the Produce method.