kafka

package
v0.36.4 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const MetadataChangeEventsTopicKey = "metadata-change-events"

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 *aukafka.SyncProducer[repository.UpdateEvent]
	KafkaConsumer *aukafka.Consumer[repository.UpdateEvent]
}

func (*Impl) ConnectProducer added in v0.36.0

func (r *Impl) ConnectProducer(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) 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