producer

package
v0.0.0-...-f2f1574 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KafkaProducer

type KafkaProducer struct {
	Version     string
	Brokers     string
	Producers   int
	KeepRunning bool
}

func NewKafkaProducer

func NewKafkaProducer() *KafkaProducer

func (*KafkaProducer) Producer

func (k *KafkaProducer) Producer(topic string, message string, num int64, f fn)

type ProducerProvider

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

pool of producers that ensure transactional-id is unique.

func (*ProducerProvider) Borrow

func (p *ProducerProvider) Borrow() (producer sarama.AsyncProducer)

func (*ProducerProvider) Release

func (p *ProducerProvider) Release(producer sarama.AsyncProducer)

Jump to

Keyboard shortcuts

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