saramax

package
v0.0.0-...-24b49fa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchHandler

type BatchHandler[T any] struct {
	// contains filtered or unexported fields
}

func NewBatchHandler

func NewBatchHandler[T any](
	l logger.Logger,
	bizFn func(msgs []*sarama.ConsumerMessage, events []T) error,
) *BatchHandler[T]

func (*BatchHandler[T]) Cleanup

Cleanup implements sarama.ConsumerGroupHandler.

func (*BatchHandler[T]) ConsumeClaim

func (h *BatchHandler[T]) ConsumeClaim(
	session sarama.ConsumerGroupSession,
	claim sarama.ConsumerGroupClaim,
) error

ConsumeClaim implements sarama.ConsumerGroupHandler.

func (*BatchHandler[T]) Setup

Setup implements sarama.ConsumerGroupHandler.

type Handler

type Handler[T any] struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler[T any](
	l logger.Logger,
	opts prometheus.SummaryOpts,
	bizFn func(msg *sarama.ConsumerMessage, event T) error,
) *Handler[T]

func (*Handler[T]) Cleanup

func (h *Handler[T]) Cleanup(sarama.ConsumerGroupSession) error

Cleanup implements sarama.ConsumerGroupHandler.

func (*Handler[T]) ConsumeClaim

func (h *Handler[T]) ConsumeClaim(
	session sarama.ConsumerGroupSession,
	claim sarama.ConsumerGroupClaim,
) error

ConsumeClaim implements sarama.ConsumerGroupHandler.

func (*Handler[T]) Setup

Setup implements sarama.ConsumerGroupHandler.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL