Documentation
¶
Overview ¶
Package kafka profiles kafka-go producers and consumers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Connection string
Topic string
GroupID string
CaptureValue bool
ValueLimit int
}
Config controls Kafka metadata and optional bounded message-value capture.
type Reader ¶
type Reader interface {
// ReadMessage waits for and returns the next message using ctx.
ReadMessage(context.Context) (kafka.Message, error)
}
Reader is the kafka-go consumer method wrapped by ProfileReader.
func ProfileReader ¶
ProfileReader wraps reader with the default profiler and records each consumed message as a job.
type Writer ¶
type Writer interface {
// WriteMessages writes one or more messages using ctx.
WriteMessages(context.Context, ...kafka.Message) error
}
Writer is the kafka-go producer method wrapped by ProfileWriter.
func ProfileWriter ¶
ProfileWriter wraps writer with the default profiler and records each producer attempt as a job dispatch.
Click to show internal directories.
Click to hide internal directories.