Documentation ¶
Overview ¶
Package kafka provides a kafka broker using sarama cluster
Index ¶
- type Broker
- func (k *Broker) Close(ctx context.Context) error
- func (k *Broker) Open(context.Context) error
- func (k *Broker) Publish(ctx context.Context, topic string, msg *broker.Message, ...) error
- func (k *Broker) String() string
- func (k *Broker) Subscribe(ctx context.Context, topic string, handler broker.Handler, ...) (broker.Subscriber, error)
- type JSONCodec
- type Option
- type PublishError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Broker ¶
type Broker struct {
// contains filtered or unexported fields
}
type Option ¶
type Option func(*Broker)
func AsyncPublish ¶
func AsyncPublish() Option
func OnAsyncPublishFailure ¶
func OnAsyncPublishFailure(f func(*PublishError)) Option
func OnAsyncPublishSuccess ¶
type PublishError ¶
Click to show internal directories.
Click to hide internal directories.