event

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: MIT Imports: 4 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 struct {
	KafkaConsumer KafkaConsumer
	EventService  Service
	ErrorReporter reporter.ErrorReporter
}

Consumer polls a kafka topic for incoming messages

func (*Consumer) Start

func (c *Consumer) Start(eventLoopContext context.Context, eventLoopDone, serviceIdentityValidated chan bool)

Start polling the kafka topic for incoming messages

type KafkaConsumer

type KafkaConsumer interface {
	Channels() *kafka.ConsumerGroupChannels
}

KafkaConsumer represents a Kafka consumer group instance

type Service

type Service interface {
	HandleMessage(ctx context.Context, message kafka.Message) (string, error)
}

Service is kafka message handler

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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