Versions in this module Expand all Collapse all v1 v1.0.0 Jan 12, 2026 Changes in this version + type Client struct + Consumer Consumer + Producer Producer + Type Type + func NewClient(opts *Options) (*Client, error) + func NewFromConfig(cfg *Config) (*Client, error) + func (c *Client) Close() error + func (c *Client) HealthCheck() error + type Config struct + Kafka *KafkaConfig + RabbitMQ *RabbitMQConfig + Type string + func (c *Config) ToOptions() (*Options, error) + func (c *Config) Validate() error + type Consumer interface + Close func() error + Subscribe func(ctx context.Context, topic string, handler MessageHandler) error + type KafkaConfig struct + Brokers []string + ClientID string + DialTimeout string + EnableSASL bool + EnableTLS bool + EnableTrace bool + Enabled bool + MaxOpenRequests int + ReadTimeout string + SASLMechanism string + SASLPassword string + SASLUsername string + Version string + WriteTimeout string + type MessageHandler func(ctx context.Context, body []byte) error + type Options struct + EnableTrace bool + KafkaBrokers []string + KafkaClientID string + KafkaDialTimeout time.Duration + KafkaEnableSASL bool + KafkaEnableTLS bool + KafkaMaxOpenRequests int + KafkaReadTimeout time.Duration + KafkaSASLMechanism string + KafkaSASLPassword string + KafkaSASLUsername string + KafkaVersion string + KafkaWriteTimeout time.Duration + RabbitMQClientID string + RabbitMQDialTimeout time.Duration + RabbitMQEnableTLS bool + RabbitMQHost string + RabbitMQPassword string + RabbitMQPort int + RabbitMQPrefetchCount int + RabbitMQPrefetchSize int + RabbitMQReadTimeout time.Duration + RabbitMQReconnectDelay time.Duration + RabbitMQURL string + RabbitMQUsername string + RabbitMQVHost string + RabbitMQWriteTimeout time.Duration + Type Type + func (o *Options) Validate() error + type Producer interface + Close func() error + Send func(ctx context.Context, topic string, body []byte, opts ...SendOption) error + SendString func(ctx context.Context, topic string, body string, opts ...SendOption) error + type RabbitMQConfig struct + ClientID string + DialTimeout string + EnableTLS bool + EnableTrace bool + Enabled bool + Host string + Password string + Port int + PrefetchCount int + PrefetchSize int + ReadTimeout string + ReconnectDelay string + URL string + Username string + VHost string + WriteTimeout string + type SendOption func(*SendOptions) + func WithHeader(key, value string) SendOption + func WithHeaders(headers map[string]string) SendOption + func WithKey(key string) SendOption + type SendOptions struct + Headers map[string]string + Key string + type Type string + const TypeKafka + const TypeRabbitMQ