# Packages
Package cgmocks offers sarama ConsumerGroup mocks
Unit testing goes like this:
In production code define following instead of using sarama.NewConsumerGroup directly: 1.
No description provided by the author
# Functions
NewAsyncProducerFromConfig creates AsyncProducer using given sarama configuration.
NewAsyncProducerFromConfigWithPrefix creates new async producer with the given configuration and metrics prefix.
NewAsyncProducerFromEnv creates AsyncProducer using broker values from environment and default sarama and metric configurations.
NewAsyncProducerFromEnvWithPrefix creates AsyncProducer using given metric prefix, broker from env.
NewConcurrentPartitionConsumer initilize the partition consumer client.
NewConcurrentPartitionConsumerFromEnv initilize the partition consumer client.
NewConcurrentPartitionConsumerWithConfig initilize the partition consumer client with given sarama config.
NewConcurrentPartitionConsumerWithConfigFromEnv initilize the partition consumer client with given sarama config.
NewDefaultAsyncProducer creates AsyncProducer with default sarama and metric configurations.
NewDefaultAsyncProducerWithPrefix creates AsyncProducer using given brokers and metrics prefix and default sarama configuration.
No description provided by the author
NewDefaultProducerWithPrefix creates new default kafka producer with given metrics prefix.
No description provided by the author
NewProducerFromConfigWithPrefix creates new kafka producer with given metrics prefix.
No description provided by the author
NewProducerFromEnvWithPrefix creates new kafka producer from env config with given metrics prefix.
# Structs
AsyncProducer is a wrapper on the sarama async_producer.
ConcurrentPartitionConsumer represnet partition consumer client.
ConsumerConf partition consumer client configuration.
Producer is a wrapper for sarama.SyncProducer which adds tracing and metrics automatically and has only single method for sending messages.
No description provided by the author
No description provided by the author
# Interfaces
ConsumerGroupHandler interface to handle consumer group lifecyle callbacks.
# Type aliases
HandlerFunc kafka message handler function signature.