kafka

package
v0.10.14 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

func Init

func Init() (err error)

func New

func New(cfg config.Kafka) (sarama.Client, error)

New returns a new Kafka client instance with given configuration. It's the caller's responsibility to close the client, caller should always call Close() when it's no longer needed.

func NewAsyncProducer

func NewAsyncProducer(client sarama.Client) (sarama.AsyncProducer, error)

NewAsyncProducer creates a new AsyncProducer using the given client

func NewConsumerGroup

func NewConsumerGroup(client sarama.Client, groupID string) (sarama.ConsumerGroup, error)

NewConsumerGroup creates a new ConsumerGroup with the given client

func NewSyncProducer

func NewSyncProducer(client sarama.Client) (sarama.SyncProducer, error)

NewSyncProducer creates a new SyncProducer using the given client

Types

This section is empty.

Jump to

Keyboard shortcuts

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