admin

package
v0.11.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
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

func NewErrQuery(err error, format string, v ...interface{}) ErrQuery

func (ErrQuery) Cause

func (e ErrQuery) Cause() error

func (ErrQuery) Error

func (e ErrQuery) Error() string

type ErrSetup

type ErrSetup error

type PartitionOffset

type PartitionOffset struct {
	Partition int32
	Begin     int64
	End       int64
	Offset    int64
	Metadata  string
}

type T

type T struct {
	// contains filtered or unexported fields
}

T provides methods to perform administrative operations on a Kafka cluster.

func Spawn

func Spawn(config *config.T) (*T, error)

Spawn creates an admin instance with the specified configuration and starts internal goroutines to support its operation.

func (*T) GetAllTopicConsumers

func (a *T) GetAllTopicConsumers(topic string) (map[string]map[string][]int32, error)

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

func (a *T) GetTopicConsumers(group, topic string) (map[string][]int32, error)

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.

func (*T) Stop

func (a *T) Stop()

Stop gracefully terminates internal goroutines.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL