kafka

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: Apache-2.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SaramaCachedClient

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

SaramaCachedClient wraps a sarama kafka client, exposing common used methods at sources and targets.

If a method fails it will try to re-connect and try again before failing.

func NewSaramaCachedClient

func NewSaramaCachedClient(ctx context.Context, bootstrapServers []string, cfg *sarama.Config, logger *zap.Logger, opts ...SaramaCachedClientOption) (*SaramaCachedClient, error)

func (*SaramaCachedClient) Close

func (sc *SaramaCachedClient) Close() error

func (*SaramaCachedClient) EnsureTopic

func (sc *SaramaCachedClient) EnsureTopic(topic string, replicas int16, partitions int32) error

func (*SaramaCachedClient) PingTopic

func (sc *SaramaCachedClient) PingTopic(topic string) error

func (*SaramaCachedClient) RefreshProducerClients

func (sc *SaramaCachedClient) RefreshProducerClients() error

func (*SaramaCachedClient) SendMessageSync

func (sc *SaramaCachedClient) SendMessageSync(message *sarama.ProducerMessage) error

type SaramaCachedClientOption

type SaramaCachedClientOption func(*SaramaCachedClient)

func WithSaramaCachedClientRefresh

func WithSaramaCachedClientRefresh(d time.Duration) SaramaCachedClientOption

Jump to

Keyboard shortcuts

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