kafka

package
v0.36.1 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewClusterAdminFn = func(brokers []string, config *sarama.Config) (sarama.ClusterAdmin, error) {
	return sarama.NewClusterAdmin(brokers, config)
}

Sarama NewClusterAdmin() Wrapper Function Variable To Facilitate Unit Testing

Functions

func NewAdminClient

func NewAdminClient(ctx context.Context, brokers []string, saramaConfig *sarama.Config) (types.AdminClientInterface, error)

Create A New Kafka AdminClient Based On The Kafka Secret In The Specified K8S Namespace

Types

type KafkaAdminClient

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

Kafka AdminClient Definition

func (KafkaAdminClient) Close

func (k KafkaAdminClient) Close() error

Sarama Pass-Through Function For Closing ClusterAdmin

func (KafkaAdminClient) CreateTopic

func (k KafkaAdminClient) CreateTopic(_ context.Context, topicName string, topicDetail *sarama.TopicDetail) *sarama.TopicError

Sarama Pass-Through Function For Creating Topics

func (KafkaAdminClient) DeleteTopic

func (k KafkaAdminClient) DeleteTopic(_ context.Context, topicName string) *sarama.TopicError

Sarama Pass-Through Function For Deleting Topics

Jump to

Keyboard shortcuts

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