errors

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EventSchema = &avro.Schema{
	Definition: event,
}

EventSchema provides the avro schema object for an error event.

Functions

This section is empty.

Types

type Event

type Event struct {
	FilterID    string `avro:"filter_id"`
	EventType   string `avro:"event_type"`
	EventMsg    string `avro:"event_message"`
	ServiceName string `avro:"service_name"`
}

Event to contain details of something that happened in the filter / export process.

type Handler

type Handler interface {
	Handle(ctx context.Context, filterID string, err error)
}

Handler is a generic interface for handling errors

type KafkaHandler

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

KafkaHandler provides an error handler that writes to the kafka error topic

func NewKafkaHandler

func NewKafkaHandler(messageProducer chan []byte) *KafkaHandler

NewKafkaHandler returns a new KafkaHandler that sends error messages

func (*KafkaHandler) Handle

func (handler *KafkaHandler) Handle(ctx context.Context, filterID string, err error)

Handle logs the error to the error handler via a kafka message

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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