package
1.0.0
Repository: https://github.com/phanitejak/kptgolib.git
Documentation: pkg.go.dev

# Functions

NewConcurrentGroupConsumer wraps handler so that it implements sarama.ConsumerGroupHandler.
NewConsumer populates Consumer with given options.
NewProducer creates producer with given options.
PreClaimPartitions will claim partition already when Init() is called but only starts forwarding messages once Run() is called.
WithConsumerConfig allows setting custom config for Consumer.
WithConsumerEnvConfig reads Config from environment variables.
WithConsumerHandler is mandatory option for setting handler.
WithConsumerMetricsPrefix allows setting prefix for metrics registry.
WithConsumerSaramaConfig allows setting custom sarama configuration.
WithProducerConfig allows setting producer configuration.
WithProducerEnvConfig reads ProducerConfig from environment variables.
WithProducerMetricsPrefix reads ProducerConfig from environment variables.
WithProducerSaramaConfig allows setting custom sarama configuration.

# Structs

ConcurrentGroupConsumer is convenience wrapper to consume partitions in parallel.
Consumer provides kafka group consumer as runnable module.
ConsumerConfig for consumer.
NoOpHandler can be used as embedded helper to avoid implementing methods of sarama.ConsumerGroupHandler which are not needed.
Producer is a wrapper to use sarama.SyncProducer as module and adds tracing and metrics.
ProducerConfig allows passing configurations for producer.
ProducerMessage adds context to sarama.ProducerMessage.

# Interfaces

Handler has a call back which will receive message and function to mark offset of that massage.

# Type aliases

ConsumerOpt for Consumer.
HandleFn can be used to pass function as Handler.
ProducerOpt is a functional option type for Producer.