consumer

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2023 License: MIT Imports: 10 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 interface {
	Start(ctx context.Context)
	RegisterHandler(handler EventHandler)
	Close()
}

func NewKafkaConsumer

func NewKafkaConsumer(opts *KafkaConsumerOpts) Consumer

type EventHandler

type EventHandler interface {
	Name() string
	Handle(ctx context.Context, event map[string]interface{}) error
}

type KafkaConsumerOpts

type KafkaConsumerOpts struct {
	Brokers  string
	GroupID  string
	Topic    string
	MinBytes int
	MaxBytes int
	MaxRetry int
}

Jump to

Keyboard shortcuts

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