Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Marshal ¶
func Marshal(extractedEvent ExtractedEvent) ([]byte, error)
Marshal converts the given observationExtractedEvent to a []byte.
Types ¶
type CSVReader ¶
type CSVReader struct {
// contains filtered or unexported fields
}
CSVReader deserialises observations from an io.Reader containing CSV encoded observations.
func NewCSVReader ¶
NewCSVReader returns a new CSVReader instance for the given io.CSVReader
func (*CSVReader) Read ¶
func (reader *CSVReader) Read() (*Observation, error)
Read will take a line from the input batchReader and convert it into an Observation instance.
type ExtractedEvent ¶
type ExtractedEvent struct { RowIndex int64 `avro:"row_index"` Row string `avro:"row"` InstanceID string `avro:"instance_id"` }
ExtractedEvent is the data that is output for each observation extracted.
type MessageProducer ¶
type MessageProducer interface {
Channels() *kafka.ProducerChannels
}
MessageProducer dependency that writes messages
type MessageWriter ¶
type MessageWriter struct {
// contains filtered or unexported fields
}
MessageWriter writes observations as messages
func NewMessageWriter ¶
func NewMessageWriter(messageProducer MessageProducer) *MessageWriter
NewMessageWriter returns a new observation message writer.
type Observation ¶
Observation represents a single observation value and its associated data.
type Reader ¶
type Reader interface {
Read() (*Observation, error)
}
Reader provides an common interface to read Observations