kafka

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKafkaReceiver

func NewKafkaReceiver(address []string, topic string, group string, logger log.Logger, cfg *conf.Event_Kafka) (event.Receiver, func(), error)

func NewKafkaSender

func NewKafkaSender(address []string, topic string, logger log.Logger, cfg *conf.Event_Kafka) (event.Sender, func(), error)

Types

type OTelInterceptor added in v0.0.2

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

func NewOTelInterceptor added in v0.0.2

func NewOTelInterceptor(kind SpanKind, brokers []string) *OTelInterceptor

NewOTelInterceptor processes span for intercepted messages and add some headers with the span data.

func (*OTelInterceptor) EndConsumerSpan added in v0.0.2

func (oi *OTelInterceptor) EndConsumerSpan(ctx context.Context, span trace.Span, err error)

func (*OTelInterceptor) OnSend added in v0.0.2

func (oi *OTelInterceptor) OnSend(msg *sarama.ProducerMessage)

func (*OTelInterceptor) StartConsumerSpan added in v0.0.2

func (oi *OTelInterceptor) StartConsumerSpan(ctx context.Context, group string, msg *sarama.ConsumerMessage) (context.Context, trace.Span)

type SpanKind added in v0.0.2

type SpanKind string
const (
	KindProducer SpanKind = "PRODUCER"
	KindConsumer SpanKind = "CONSUMER"
)

Jump to

Keyboard shortcuts

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