Documentation
¶
Index ¶
- Variables
- type AckFunc
- type Codec
- type ConsumHandler
- type Consumer
- type ErrFunc
- type Option
- type Producer
- func (p *Producer) Close() error
- func (p *Producer) GetAsyncProducer() sarama.AsyncProducer
- func (p *Producer) Publish(topic string, data interface{}) error
- func (p *Producer) PublishRawMsg(msg *sarama.ProducerMessage) error
- func (p *Producer) PublishString(topic, message string) error
- func (p *Producer) SetCodec(codec Codec)
- func (p *Producer) SetError(errFunc ErrFunc)
- func (p *Producer) SetSuccess(ackFunc AckFunc)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAlreadyClosed = errors.New("producer already closed") ErrGroupNotFound = errors.New("group not found") )
errors defined
Functions ¶
This section is empty.
Types ¶
type AckFunc ¶ added in v1.1.0
type AckFunc func(*sarama.ProducerMessage)
type ConsumHandler ¶
type ConsumHandler struct { }
ConsumHandler ...
func (*ConsumHandler) Cleanup ¶
func (h *ConsumHandler) Cleanup(sarama.ConsumerGroupSession) error
Cleanup ..
func (*ConsumHandler) ConsumeClaim ¶
func (h *ConsumHandler) ConsumeClaim(sess sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error
ConsumeClaim ..
func (*ConsumHandler) Setup ¶
func (h *ConsumHandler) Setup(sarama.ConsumerGroupSession) error
Setup ..
type Consumer ¶
type Consumer struct { Topics []string Reconnect time.Duration // contains filtered or unexported fields }
Consumer ...
func NewConsumer ¶
NewConsumer ...
func (*Consumer) DeleteGroup ¶ added in v1.0.1
type ErrFunc ¶ added in v1.1.0
type ErrFunc func(*sarama.ProducerError)
type Producer ¶
type Producer struct {
// contains filtered or unexported fields
}
Producer ...
func NewProducer ¶
NewProducer ...
func (*Producer) GetAsyncProducer ¶ added in v1.1.0
func (p *Producer) GetAsyncProducer() sarama.AsyncProducer
GetAsyncProducer ...
func (*Producer) PublishRawMsg ¶ added in v1.0.1
func (p *Producer) PublishRawMsg(msg *sarama.ProducerMessage) error
PublishRawMsg ...
func (*Producer) PublishString ¶
PublishString ...
func (*Producer) SetSuccess ¶ added in v1.1.0
SetSuccess ...
Click to show internal directories.
Click to hide internal directories.