consumer

package
v0.0.0-...-04633c7 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer

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

func NewConsumer

func NewConsumer[T any](
	logger *slog.Logger,
	handler Handler[T],
) *Consumer[T]

func (*Consumer[_]) Cleanup

func (c *Consumer[_]) Cleanup(_ sarama.ConsumerGroupSession) error

func (*Consumer[T]) ConsumeClaim

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

func (*Consumer[_]) Setup

func (c *Consumer[_]) Setup(_ sarama.ConsumerGroupSession) error

type Handler

type Handler[T any] interface {
	Handle(v T) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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