producer

package
v0.25.1 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Producer

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

Producer Struct

func NewProducer

func NewProducer(logger *zap.Logger,
	config *sarama.Config,
	brokers []string,
	statsReporter metrics.StatsReporter,
	healthServer *health.Server) (*Producer, error)

Initialize The Producer

func (*Producer) Close

func (p *Producer) Close()

Close The Producer (Stop Processing)

func (*Producer) ObserveMetrics

func (p *Producer) ObserveMetrics(interval time.Duration)

Async Process For Observing Kafka Metrics

func (*Producer) ProduceKafkaMessage

func (p *Producer) ProduceKafkaMessage(ctx context.Context, channelReference eventingChannel.ChannelReference, message binding.Message, transformers ...binding.Transformer) error

Produce A KafkaMessage From The Specified CloudEvent To The Specified Topic And Wait For The Delivery Report

func (*Producer) SecretChanged added in v0.21.0

func (p *Producer) SecretChanged(ctx context.Context, secret *corev1.Secret) *Producer

SecretChanged is called by the secretObserver handler function in main() so that settings specific to the producer may be extracted and the producer restarted if necessary.

Jump to

Keyboard shortcuts

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