event

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 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 ContentPublished

type ContentPublished struct {
	URI          string `avro:"uri"`
	DataType     string `avro:"data_type"`
	CollectionID string `avro:"collection_id"`
	JobID        string `avro:"job_id"`
	SearchIndex  string `avro:"search_index"`
	TraceID      string `avro:"trace_id"`
}

ContentPublished provides an avro structure for a Content Published event

type ContentPublishedHandler

type ContentPublishedHandler struct {
	// contains filtered or unexported fields
}

func NewContentPublishedHandler

func NewContentPublishedHandler(store sitemap.FileStore, client clients.ZebedeeClient, cfg *config.Config, fetcher sitemap.Fetcher) *ContentPublishedHandler

func (*ContentPublishedHandler) Handle

func (h *ContentPublishedHandler) Handle(ctx context.Context, cfg *config.Config, event *ContentPublished) (err error)

Handle takes a single event.

type Handler

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

Handler represents a handler for processing a single event.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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