producer

package
v0.0.0-...-3d8a049 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	MaxProducers uint64        `yaml:"maxProducers"`
	BatchSize    uint64        `yaml:"batchSize"`
	Timeout      time.Duration `yaml:"timeout"`
}

Config object to store producer configurations into.

type Producer

type Producer interface {
	Start(ctx context.Context)
	Close()
}

Producer is the interface not to be used directly.

See Retranslator.

func NewKafkaProducer

func NewKafkaProducer(
	cfg *Config,
	eventSender sender.EventSender,
	cleaner repo.EventCleaner,
	updater repo.EventUpdater,
	events <-chan model.BasketEvent,
	workerPool *workerpool.WorkerPool,
	logger *zap.Logger,
) Producer

NewKafkaProducer returns a new Kafka producer.

Jump to

Keyboard shortcuts

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