Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsumeFlags ¶
func DefaultConsumeFlags ¶
func DefaultConsumeFlags() ConsumeFlags
type ConsumerGroup ¶
type KafkaDataSource ¶
type KafkaDataSource interface {
Init(cfgOption string)
GetTopics() (map[string]Topic, error)
GetContexts() ([]string, error)
GetContext() string
SetContext(contextName string) error
GetConsumerGroups() ([]ConsumerGroup, error)
ConsumeTopic(ctx context.Context, topicName string, flags ConsumeFlags, handleMessage MessageHandlerFunc, onError func(err any)) error
}
type MessageHandlerFunc ¶
type MessageHandlerFunc func(msg Message)
type Topic ¶
type Topic struct {
// NumPartitions contains the number of partitions to create in the topic
NumPartitions int32
// ReplicationFactor contains the number of replicas to create for each partition
ReplicationFactor int16
// ReplicaAssignment contains the manual partition assignment, or the empty
// array if we are using automatic assignment.
ReplicaAssignment map[int32][]int32
// ConfigEntries contains the custom topic configurations to set.
ConfigEntries map[string]*string
// Num of messages in the topic across all partitions
MessageCount int64
}
Click to show internal directories.
Click to hide internal directories.