Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsumerGroupsCommandClient ¶
type ConsumerGroupsCommandClient struct {
GroupsFn func() ([]string, error)
GroupInvocations int
DescribeGroupFn func(group string) ([]exporter.PartitionInfo, error)
DescribeGroupInvocations int
}
ConsumerGroupsCommandClient is a fake Kafka queries which can be used for testing purposes when Kafka and/or the `kafka-consumer-groups.sh` is missing.
func NewBasicConsumerGroupsCommandClient ¶
func NewBasicConsumerGroupsCommandClient() *ConsumerGroupsCommandClient
NewBasicConsumerGroupsCommandClient creates a new ConsumerGroupsCommandClient with prepopulated functions. For mocking, you can override the function implementations.
func (*ConsumerGroupsCommandClient) DescribeGroup ¶
func (col *ConsumerGroupsCommandClient) DescribeGroup(_ context.Context, group string) ([]exporter.PartitionInfo, error)
DescribeGroup returns a single fake partition for the group that Groups returns. For other consumer groups it returns an error.
Source Files
¶
- collector.go
Click to show internal directories.
Click to hide internal directories.