Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type T ¶
type T struct {
// contains filtered or unexported fields
}
T is a subscriber implementation based on ZooKeeper. It maintains consumer group membership and topic subscriptions, watches for other members to join, leave and update their subscriptions, and generates notifications of such changes. It also provides an API to for a partition consumer to claim and release a group-topic-partition.
func Spawn ¶
func Spawn(parentActDesc *actor.Descriptor, group string, cfg *config.Proxy, kazooClt *kazoo.Kazoo) *T
Spawn creates a subscriber instance and starts its goroutine.
func (*T) ClaimPartition ¶
func (ss *T) ClaimPartition(claimerActDesc *actor.Descriptor, topic string, partition int32, cancelCh <-chan none.T) func()
ClaimPartition claims a topic/partition to be consumed by this member of the consumer group. It blocks until either succeeds or canceled by the caller. It returns a function that should be called to release the claim.
func (*T) Stop ¶
func (ss *T) Stop()
Stop signals the consumer group member to stop and blocks until its goroutines are over.
func (*T) Subscriptions ¶
Subscriptions returns a channel that subscriptions will be sent whenever a member joins or leaves the group or when an existing member updates its subscription.