kafka

package
v0.0.0-...-52d4462 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Tls

func Tls(c *config.Bootstrap) *tls.Config

Types

type K

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

func NewKafka

func NewKafka(c *config.Bootstrap) *K

func (*K) CreateTopic

func (k *K) CreateTopic(topic string, partition int, replication int, serverAddr string)

CreateTopic 创建 topic

func (*K) DeleteGroup

func (k *K) DeleteGroup(groupId string, serverAddr string)

DeleteGroup 删除 consumer group

func (*K) DeleteTopic

func (k *K) DeleteTopic(topic string, serverAddr string)

DeleteTopic 删除 topic

func (*K) ListConsumerGroups

func (k *K) ListConsumerGroups(serverAddr string)

func (*K) ListTopics

func (k *K) ListTopics(serverAddr string)

func (*K) Reader

func (k *K) Reader(topic string, groupId string, serverAddr string) *kafka.Reader

func (*K) Writer

func (k *K) Writer(topic string, serverAddr string) *kafka.Writer

Jump to

Keyboard shortcuts

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