package
9.1.81+incompatible
Repository: https://github.com/pinpt/go-common.git
Documentation: pkg.go.dev

# Functions

IsMessageGzipCompressed returns true if the header contains a gzip compressed header indicating that the value is gzip bytes.
NewAdminClientUsingConsumer will create a new AdminClient from a Consumer.
NewAdminClientUsingProducer will create a new AdminClient from a Producer.
NewConfigMap returns a ConfigMap from a Config.
NewConsumer returns a new Consumer instance.
NewConsumerCallbackWithGroupEOF will create a delegate for handling a ConsumerCallbackAdapter and adding a GroupEOF event as a func handler.
NewPingConsumer returns a new Consumer instance that supports only pings.
NewProducer returns a new Producer instance.
NewTrackingConsumer returns a consumer callback adapter which tracks EOF.

# Constants

CompressionGzip is the value to indicate the compression type.
CompressionHeader is the name of the header used to indicate compressed value.
DefaultIdleDuration is the default duration once we receive EOF for all partitions to determine if the consumer group is idle.
DefaultMinGzipBytes is the minimum size of data before we compress (assuming config.Gzip = true).

# Variables

ErrMissingTopic is an error that is returned if the topic is missing in the Message.
ErrMissingTopics is returned if no topics are passed.

# Structs

No description provided by the author
Config holds the configuration for connection to the broker.
Consumer will return a kafka consumer.
JobKey is information contained in the job header.
OffsetAssignments is an assignment of partition.
Producer will emit events to kafka.
TopicConfig is the configuration for the topic.
TrackingConsumer is an utility which will track a consumer group and detect when the consumer group has it EOF across all the partitions in the consumer group.

# Interfaces

AdminClient provides an interfae for talking with the Kafka admin.
ConsumerEOFCallback is an interface for handling topic EOF events.
ConsumerStatsCallback is an interface for handling stats events.
TrackingConsumerEOF is a handler for receiving the EOF for the consumer group.

# Type aliases

ShouldProcessEventMessage is a handler for deciding if we should process the event after deserialization but before we deliver to consumer handler.
ShouldProcessKafkaMessage is a handler for deciding if we should process the incoming kafka message before it's deserialized.