Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandOutput ¶
CommandOutput is the output from a DescribeGroupParser.
type ConsumerGroupsCommandClient ¶
type ConsumerGroupsCommandClient struct { Parser DescribeGroupParser BootstrapServers string ConsumerGroupCommandPath string }
ConsumerGroupsCommandClient queries Kafka for consumer groups and their current log and offset states.
func (*ConsumerGroupsCommandClient) DescribeGroup ¶
func (col *ConsumerGroupsCommandClient) DescribeGroup(ctx context.Context, group string) ([]exporter.PartitionInfo, error)
DescribeGroup returns current state of all partitions subscribed to by a consumer group.
type DelegatingParser ¶
type DelegatingParser struct {
Parsers []DescribeGroupParser
}
DelegatingParser is a parser that tries multiple parser returning the first succesful parsed result.
func DefaultDescribeGroupParser ¶
func DefaultDescribeGroupParser() *DelegatingParser
DefaultDescribeGroupParser returns a DelegatingParser consisting of all formats known.
func (*DelegatingParser) Parse ¶
func (p *DelegatingParser) Parse(output CommandOutput) ([]exporter.PartitionInfo, error)
Parse parses the output. It tries each Parser in order, returning an error if all fails.
func (*DelegatingParser) String ¶
func (p *DelegatingParser) String() string
type DescribeGroupParser ¶
type DescribeGroupParser interface { // Parses the output from `kafka-consumer-group.sh --describe` Parse(output CommandOutput) ([]exporter.PartitionInfo, error) }
DescribeGroupParser parses the output from `kafka-consumer-group.sh --describe`.
Source Files
¶
- collector.go
- parsing.go
Click to show internal directories.
Click to hide internal directories.