event

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Consume

func Consume(ctx context.Context, messageConsumer kafka.IConsumerGroup, handler Handler, cfg *config.Config)

Consume converts messages to event instances, and pass the event to the provided handler.

Types

type Handler

type Handler interface {
	Handle(ctx context.Context, contentPublished *models.ContentPublished, cfg config.Config) error
}

Handler represents a handler for processing a single event.

type Marshaller added in v0.2.0

type Marshaller interface {
	Marshal(s interface{}) ([]byte, error)
}

Marshaller defines a type for marshalling the requested object into the required format.

type SearchDataImportProducer added in v0.2.0

type SearchDataImportProducer struct {
	Marshaller Marshaller
	Producer   kafka.IProducer
}

SearchDataImportProducer produces kafka messages for instances which have been successfully processed.

func (SearchDataImportProducer) SearchDataImport added in v0.2.0

func (p SearchDataImportProducer) SearchDataImport(ctx context.Context, event models.SearchDataImport) error

SearchDataImport produce a kafka message for an instance which has been successfully processed.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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