Documentation
¶
Index ¶
Constants ¶
View Source
const ( OffsetResetSmallest = go_kafka_client.SmallestOffset OffsetResetLargest = go_kafka_client.LargestOffset )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AvroMessage ¶
type AvroMessage interface { // Bytes returns a byte array containing the parsed contents of the message. Bytes() []byte }
AvroMessage represents a Kafka message that's been successfully decoded with Avro.
type Consumer ¶
type Consumer interface { // SetClientID sets the identifier used to uniquely describe the consumer. SetClientID(clientID string) // SetGroupID sets the identifier used to uniquely describe the group to // which this consumer belongs. SetGroupID(groupID string) // RunTopic runs a message handler against a topic. The handler // gets called each time a new message is received. RunTopic(topic string, handler Handler) }
Consumer represents the interface for consuming data from a Kafka topic.
type Handler ¶
type Handler func(message AvroMessage) error
Handler defines the function signature for handling the contents of a decoded Avro message.
Click to show internal directories.
Click to hide internal directories.