Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchConsumerHandler ¶
type BatchConsumerHandler[T any] struct { // contains filtered or unexported fields }
BatchConsumerHandler 消费者
func NewBatchConsumerHandler ¶
func NewBatchConsumerHandler[T any](fn func(allMsg []*sarama.ConsumerMessage, allData []T) error) *BatchConsumerHandler[T]
func (BatchConsumerHandler[T]) Cleanup ¶
func (h BatchConsumerHandler[T]) Cleanup(session sarama.ConsumerGroupSession) error
func (BatchConsumerHandler[T]) ConsumeClaim ¶
func (h BatchConsumerHandler[T]) ConsumeClaim(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error
func (BatchConsumerHandler[T]) Setup ¶
func (h BatchConsumerHandler[T]) Setup(session sarama.ConsumerGroupSession) error
type ConsumerHandler ¶
type ConsumerHandler[T any] struct { // contains filtered or unexported fields }
ConsumerHandler 消费者
func NewConsumerHandler ¶
func NewConsumerHandler[T any](fn func(msg *sarama.ConsumerMessage, data T) error) *ConsumerHandler[T]
func (ConsumerHandler[T]) Cleanup ¶
func (h ConsumerHandler[T]) Cleanup(session sarama.ConsumerGroupSession) error
func (ConsumerHandler[T]) ConsumeClaim ¶
func (h ConsumerHandler[T]) ConsumeClaim(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error
func (ConsumerHandler[T]) Setup ¶
func (h ConsumerHandler[T]) Setup(session sarama.ConsumerGroupSession) error
Click to show internal directories.
Click to hide internal directories.