kafka

package
v9.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKafkaConsumerProvider

func NewKafkaConsumerProvider(cfg Config, opts ...Option) messagequeue.ConsumerProvider

NewKafkaConsumerProvider returns a ConsumerProvider backed by Kafka.

func NewKafkaPublisherProvider

func NewKafkaPublisherProvider(cfg Config, opts ...Option) messagequeue.PublisherProvider

NewKafkaPublisherProvider returns a PublisherProvider backed by Kafka.

Types

type Config

type Config struct {
	GroupID string   `env:"GROUP_ID" json:"groupId,omitempty" yaml:"groupId,omitempty"`
	Brokers []string `env:"BROKERS"  json:"brokers,omitempty" yaml:"brokers,omitempty"`
}

Config configures a Kafka-backed message queue.

func (*Config) ValidateWithContext

func (cfg *Config) ValidateWithContext(ctx context.Context) error

ValidateWithContext validates a Config struct.

type Option

type Option func(*options)

Option configures the providers this package constructs. The zero configuration works: absent observability deps are normalized downstream.

func WithLogger

func WithLogger(logger logging.Logger) Option

WithLogger attaches a logger.

func WithMetricsProvider

func WithMetricsProvider(metricsProvider metrics.Provider) Option

WithMetricsProvider attaches a metrics provider.

func WithTracerProvider

func WithTracerProvider(tracerProvider tracing.TracerProvider) Option

WithTracerProvider attaches a tracer provider.

Jump to

Keyboard shortcuts

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