kafka

package
v0.18.8 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminClient

type AdminClient interface {
	// ListConsumerGroups Lists the consumer groups
	ListConsumerGroups() ([]string, error)
}

func NewAdminClient

func NewAdminClient(ctx context.Context, caFactory ClusterAdminFactory) (AdminClient, error)

type AdminClientManager

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

AdminClientManager manages a ClusterAdmin connection and recreates one when needed it is made to overcome https://github.com/Shopify/sarama/issues/1162

func (*AdminClientManager) ListConsumerGroups

func (c *AdminClientManager) ListConsumerGroups() ([]string, error)

ListConsumerGroups Returns a list of the consumer groups.

In the occasion of errors, there will be a retry with an exponential backoff. Due to a known issue in Sarama ClusterAdmin https://github.com/Shopify/sarama/issues/1162, a new ClusterAdmin will be created with every retry until the call succeeds or the timeout is reached.

type ClusterAdminFactory

type ClusterAdminFactory func() (sarama.ClusterAdmin, error)

Jump to

Keyboard shortcuts

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