Documentation ¶
Index ¶
- type KafkaConsumer
- func (kc *KafkaConsumer) Close() error
- func (kc *KafkaConsumer) SetErrorHandler(handler KafkaConsumerErrorHandler)
- func (kc *KafkaConsumer) SetMsgHandler(handler KafkaConsumerMsgHandler)
- func (kc *KafkaConsumer) SetNotificationHandler(handler KafkaConsumerNotificationHandler)
- func (kc *KafkaConsumer) Start() error
- type KafkaConsumerErrorHandler
- type KafkaConsumerMsgHandler
- type KafkaConsumerNotificationHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KafkaConsumer ¶
type KafkaConsumer struct {
// contains filtered or unexported fields
}
func New ¶
func New(addressList string, group string, topicList []string) *KafkaConsumer
New 创建kafka消息者
func (*KafkaConsumer) Close ¶
func (kc *KafkaConsumer) Close() error
func (*KafkaConsumer) SetErrorHandler ¶
func (kc *KafkaConsumer) SetErrorHandler(handler KafkaConsumerErrorHandler)
func (*KafkaConsumer) SetMsgHandler ¶
func (kc *KafkaConsumer) SetMsgHandler(handler KafkaConsumerMsgHandler)
func (*KafkaConsumer) SetNotificationHandler ¶
func (kc *KafkaConsumer) SetNotificationHandler(handler KafkaConsumerNotificationHandler)
func (*KafkaConsumer) Start ¶
func (kc *KafkaConsumer) Start() error
type KafkaConsumerErrorHandler ¶
type KafkaConsumerErrorHandler func(err error)
type KafkaConsumerMsgHandler ¶
type KafkaConsumerMsgHandler func(msg *sarama.ConsumerMessage) bool
type KafkaConsumerNotificationHandler ¶
type KafkaConsumerNotificationHandler func(notification *cluster.Notification)
Click to show internal directories.
Click to hide internal directories.