kafka

package
v0.35.1 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(
	configuration librepo.Configuration,
	customConfig config.CustomConfiguration,
	logging librepo.Logging,
	hostIP repository.HostIP,
) repository.Kafka

Types

type Impl

type Impl struct {
	Configuration       librepo.Configuration
	CustomConfiguration config.CustomConfiguration
	Logging             librepo.Logging
	HostIP              repository.HostIP

	Callback      repository.ReceiverCallback
	KafkaProducer *kgo.Client
	KafkaConsumer *kgo.Client
	KafkaTopic    string
}

func (*Impl) Connect

func (r *Impl) Connect(ctx context.Context) error

func (*Impl) Disconnect

func (r *Impl) Disconnect(ctx context.Context) error

func (*Impl) IsKafka

func (r *Impl) IsKafka() bool

func (*Impl) Level

func (r *Impl) Level() kgo.LogLevel

func (*Impl) Log

func (r *Impl) Log(level kgo.LogLevel, msg string, keyvals ...interface{})

func (*Impl) Send

func (r *Impl) Send(ctx context.Context, event repository.UpdateEvent) error

func (*Impl) Setup added in v0.33.0

func (r *Impl) Setup() error

func (*Impl) StartReceiveLoop

func (r *Impl) StartReceiveLoop(ctx context.Context) error

func (*Impl) SubscribeIncoming

func (r *Impl) SubscribeIncoming(ctx context.Context, callback repository.ReceiverCallback) error

func (*Impl) Teardown added in v0.33.0

func (r *Impl) Teardown()

Jump to

Keyboard shortcuts

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