event

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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