Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AvroProducer ¶
type AvroProducer struct {
// contains filtered or unexported fields
}
AvroProducer produces Avro serialised messages.
func NewAvroProducer ¶
func NewAvroProducer(kafkaProducer KafkaProducer) *AvroProducer
NewAvroProducer returns a new instance of AvroProducer.
func (*AvroProducer) HierarchyBuilt ¶
func (producer *AvroProducer) HierarchyBuilt(ctx context.Context, instanceID, dimensionName string) error
HierarchyBuilt produces a new CSV exported event for the given filter output ID.
type Consumer ¶
type Consumer struct {
// contains filtered or unexported fields
}
Consumer consumes event messages.
func (*Consumer) Consume ¶
func (consumer *Consumer) Consume(ctx context.Context, messageConsumer MessageConsumer, handler Handler, errorReporter reporter.ErrorReporter)
Consume converts messages to event instances, and pass the event to the provided handler.
type DataImportCompleteHandler ¶
type DataImportCompleteHandler struct {
// contains filtered or unexported fields
}
DataImportCompleteHandler ...
func NewDataImportCompleteHandler ¶
func NewDataImportCompleteHandler(hierarchyStore HierarchyStore, eventProducer EventProducer) *DataImportCompleteHandler
NewDataImportCompleteHandler ...
func (DataImportCompleteHandler) Handle ¶
func (handler DataImportCompleteHandler) Handle(ctx context.Context, event *events.DataImportComplete) error
Handle takes a single event, and returns the observations gathered from the URL in the event.
type EventProducer ¶
type EventProducer interface {
HierarchyBuilt(ctx context.Context, instanceID, dimensionName string) error
}
EventProducer handles producing output events.
type Handler ¶
type Handler interface {
Handle(ctx context.Context, dataImportComplete *events.DataImportComplete) error
}
Handler represents a handler for processing a single event.
type HierarchyStore ¶
type HierarchyStore interface {
BuildHierarchy(instanceID, codeListID, dimensionName string) error
}
HierarchyStore provides storage functionality for hierarchy data
type KafkaProducer ¶
type KafkaProducer interface { Channels() *kafka.ProducerChannels Close(ctx context.Context) (err error) }
KafkaProducer represents the interface of a Kafka Producer
type MessageConsumer ¶
type MessageConsumer interface {
Channels() *kafka.ConsumerGroupChannels
}
MessageConsumer provides a generic interface for consuming []byte messages