Documentation ¶
Index ¶
- Variables
- type ConsumerGroup
- func (cg *ConsumerGroup) AddHandler(topic common.Topic, hm common.MessageHandler) error
- func (cg *ConsumerGroup) Cleanup(_ sarama.ConsumerGroupSession) error
- func (cg *ConsumerGroup) Close() error
- func (cg *ConsumerGroup) Consume() error
- func (cg *ConsumerGroup) ConsumeClaim(sess sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error
- func (cg *ConsumerGroup) PauseAll()
- func (cg *ConsumerGroup) ResumeAll()
- func (cg *ConsumerGroup) Setup(sess sarama.ConsumerGroupSession) error
- type ConsumerGroupOption
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrTopicExists = errors.New("topic already exists")
)
Functions ¶
This section is empty.
Types ¶
type ConsumerGroup ¶
type ConsumerGroup struct {
// contains filtered or unexported fields
}
func NewConsumerGroup ¶
func NewConsumerGroup( cfg common.Config, name string, logger *zap.Logger, opts ...ConsumerGroupOption, ) (*ConsumerGroup, error)
func (*ConsumerGroup) AddHandler ¶
func (cg *ConsumerGroup) AddHandler(topic common.Topic, hm common.MessageHandler) error
func (*ConsumerGroup) Cleanup ¶
func (cg *ConsumerGroup) Cleanup(_ sarama.ConsumerGroupSession) error
func (*ConsumerGroup) Close ¶
func (cg *ConsumerGroup) Close() error
func (*ConsumerGroup) Consume ¶
func (cg *ConsumerGroup) Consume() error
func (*ConsumerGroup) ConsumeClaim ¶
func (cg *ConsumerGroup) ConsumeClaim(sess sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error
func (*ConsumerGroup) PauseAll ¶ added in v1.0.23
func (cg *ConsumerGroup) PauseAll()
func (*ConsumerGroup) ResumeAll ¶ added in v1.0.23
func (cg *ConsumerGroup) ResumeAll()
func (*ConsumerGroup) Setup ¶
func (cg *ConsumerGroup) Setup(sess sarama.ConsumerGroupSession) error
type ConsumerGroupOption ¶
type ConsumerGroupOption func(cg *ConsumerGroup)
func ConfigOption ¶
func ConfigOption(cfg *sarama.Config) ConsumerGroupOption
func ErrFuncOption ¶
func ErrFuncOption(f common.ErrFunc) ConsumerGroupOption
Click to show internal directories.
Click to hide internal directories.