Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestConnect ¶
Types ¶
type ByPartition ¶
type ByPartition struct{ Offsets }
func (ByPartition) Less ¶
func (p ByPartition) Less(i, j int) bool
type KafkaKeeper ¶
type KafkaKeeper struct { Consumer *TopicConsumer State *KafkaState // contains filtered or unexported fields }
KafkaKeeper - Used to manage consumer per topic, per application consuming > /{TopicConsumer.Root}/{topic}/consumers/{consumer-app}/partitions
/{partition}/consumed/{offset}
func NewKafkaKeeper ¶
func NewKafkaKeeper(hosts []string, c *TopicConsumer, s *KafkaState) *KafkaKeeper
func (*KafkaKeeper) GetOffsets ¶
func (z *KafkaKeeper) GetOffsets() ([]*PartitionOffset, error)
GetOffsets - returns an array sorted by Partition ascending
type KafkaOffsets ¶
type KafkaOffsets struct { ZookeeperHosts []string // ConsumerApp - consumer application get's it's own distinct offsets on the topic ConsumerApp string }
func (*KafkaOffsets) Offsets ¶
func (ko *KafkaOffsets) Offsets(topic string) ([]*PartitionOffset, error)
type KafkaState ¶
func (*KafkaState) PartitionsPath ¶
func (ks *KafkaState) PartitionsPath() string
type Offsets ¶
type Offsets []*PartitionOffset
type PartitionOffset ¶
type TopicConsumer ¶
type TopicConsumer struct { Topic string // ConsumerApp - typically the name of the app or function for it's own dedicated set of offsets ConsumerApp string // Root - suggested name /kafka-topics Root string }
func (*TopicConsumer) PartitionsPath ¶
func (tc *TopicConsumer) PartitionsPath() string
Click to show internal directories.
Click to hide internal directories.