kafka

package
v0.0.0-...-f55d11e Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	GetPartitions(topic string) ([]int, error)
	Producer(completionHandler func(messages []kafka.Message, err error)) *kafka.Writer
	Consumer(topic string, partition int, startOffset int64) *kafka.Reader
	CheckTopic(topic string) error
}

func NewClient

func NewClient(config *config.Connector) Client

type MetricsRecorder

type MetricsRecorder interface {
	RecordKafkaConnectorLatency(latencyMs int64)
	RecordBatchProduceLatency(latencyMs int64)
}

type RejectionLog

type RejectionLog struct {
	Topic string
	Value string
	Error string
	Key   []byte
}

type RejectionLogSinkResponseHandler

type RejectionLogSinkResponseHandler struct {
	KafkaClient Client
	Writer      *kafka.Writer
	Topic       string
	Config      config.Kafka
}

func (*RejectionLogSinkResponseHandler) OnError

func (*RejectionLogSinkResponseHandler) OnInit

func (*RejectionLogSinkResponseHandler) OnSuccess

type SinkResponseHandler

type SinkResponseHandler interface {
	OnInit(ctx *SinkResponseHandlerInitContext)
	OnSuccess(ctx *SinkResponseHandlerContext)
	OnError(ctx *SinkResponseHandlerContext)
}

func NewRejectionLogSinkResponseHandler

func NewRejectionLogSinkResponseHandler() SinkResponseHandler

type SinkResponseHandlerContext

type SinkResponseHandlerContext struct {
	Message *message.KafkaMessage
	Err     error
}

type SinkResponseHandlerInitContext

type SinkResponseHandlerInitContext struct {
	KafkaClient Client
	Writer      *kafka.Writer
	Config      config.Kafka
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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