Documentation ¶
Index ¶
- func NewSASLPlainPublisherConfig(username, password string) *sarama.Config
- func NewSASLPlainSubscriberConfig(username, password string) *sarama.Config
- func NewSASLPublisherConfig(username, password string) *sarama.Config
- func NewSASLSubscriberConfig(username, password string) *sarama.Config
- type Publisher
- type Subscriber
- type Subscription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSASLPlainPublisherConfig ¶ added in v0.0.18
NewSASLPlainPublisherConfig creates a new kafka publisher config with Plain SASL authentication.
func NewSASLPlainSubscriberConfig ¶ added in v0.0.18
NewSASLPlainSubscriberConfig creates a new kafka subscriber config with Plain SASL authentication.
func NewSASLPublisherConfig ¶
NewSASLPublisherConfig creates a new kafka publisher config with SASL authentication.
func NewSASLSubscriberConfig ¶
NewSASLSubscriberConfig creates a new kafka subscriber config with SASL authentication.
Types ¶
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
Publisher represents a kafka publisher.
type Subscriber ¶
type Subscriber struct {
// contains filtered or unexported fields
}
Subscriber represents a kafka subscriber.
func NewSubscriber ¶
func NewSubscriber( slogHandler slog.Handler, saramaConfig *sarama.Config, brokers []string, consumerGroup string, ) (*Subscriber, error)
NewSubscriber creates a new kafka subscriber. nolint: revive // allow unused consumerGroup parameter for future proofing.
func (Subscriber) Subscribe ¶
func (s Subscriber) Subscribe(channels ...string) (pubsub.Subscription[string, []byte], error)
Subscribe creates a new subscription that runs in the background.
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
Subscription represents a stream of events published to a kafka topic.