saramax

package
v0.0.0-...-d13da26 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2023 License: Apache-2.0 Imports: 6 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.LoggerV1, fn func(msgs []*sarama.ConsumerMessage, ts []T) error) *BatchHandler[T]

func (*BatchHandler[T]) Cleanup

func (b *BatchHandler[T]) Cleanup(session sarama.ConsumerGroupSession) error

func (*BatchHandler[T]) ConsumeClaim

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

func (*BatchHandler[T]) Setup

func (b *BatchHandler[T]) Setup(session sarama.ConsumerGroupSession) error

type CounterBuilder

type CounterBuilder struct {
	Namespace  string
	Subsystem  string
	Name       string
	Help       string
	InstanceID string
}

func (*CounterBuilder) Build

func (c *CounterBuilder) Build() prometheus.Counter

type Handler

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

func NewHandler

func NewHandler[T any](l logger.LoggerV1, fn func(msg *sarama.ConsumerMessage, t T) error) *Handler[T]

func (Handler[T]) Cleanup

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

func (Handler[T]) ConsumeClaim

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

func (Handler[T]) Setup

func (h Handler[T]) Setup(session sarama.ConsumerGroupSession) error

type HandlerV1

type HandlerV1[T any] func(msg *sarama.ConsumerMessage, t T) error

Jump to

Keyboard shortcuts

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