Documentation ¶
Index ¶
- Constants
- type ErrInvalidParam
- type ErrQuery
- type ErrSetup
- type PartitionOffset
- type T
- func (a *T) GetAllTopicConsumers(topic string) (map[string]map[string][]int32, error)
- func (a *T) GetGroupOffsets(group, topic string) ([]PartitionOffset, error)
- func (a *T) GetTopicConsumers(group, topic string) (map[string][]int32, error)
- func (a *T) SetGroupOffsets(group, topic string, offsets []PartitionOffset) error
- func (a *T) Stop()
Constants ¶
const (
ProtocolVer1 = 1 // Supported by Kafka v0.8.2 and later
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrInvalidParam ¶
type ErrInvalidParam error
type ErrQuery ¶
type ErrQuery struct {
// contains filtered or unexported fields
}
func NewErrQuery ¶
type PartitionOffset ¶
type T ¶
type T struct {
// contains filtered or unexported fields
}
T provides methods to perform administrative operations on a Kafka cluster.
func Spawn ¶
Spawn creates an admin instance with the specified configuration and starts internal goroutines to support its operation.
func (*T) GetAllTopicConsumers ¶
GetAllTopicConsumers returns group -> client-id -> consumed-partitions-list mapping for a particular topic. Warning, the function performs scan of all consumer groups registered in ZooKeeper and therefore can take a lot of time.
func (*T) GetGroupOffsets ¶
func (a *T) GetGroupOffsets(group, topic string) ([]PartitionOffset, error)
GetGroupOffsets for every partition of the specified topic it returns the current offset range along with the latest offset and metadata committed by the specified consumer group.
func (*T) GetTopicConsumers ¶
GetTopicConsumers returns client-id -> consumed-partitions-list mapping for a clients from a particular consumer group and a particular topic.
func (*T) SetGroupOffsets ¶
func (a *T) SetGroupOffsets(group, topic string, offsets []PartitionOffset) error
SetGroupOffsets commits specific offset values along with metadata for a list of partitions of a particular topic on behalf of the specified group.