# Functions
BinValue is a function that tuns a value and a slice containing bin boundaries into a slice containing the binned value.
NewMovingAverager returns an instance of our MovingAverager interface.
NewProcessor is a constructor function that takes as input an instantiated datastore client, and a logger.
# Variables
DatastoreErrorCounter is a prometheus counter recording a count of any errors that occur when writing to the datastore.
DatastoreWriteHistogram is a prometheus histogram recording successful writes to the datastore.
ProcessHistogram is a prometheus histogram recording duration of processing a device for a stream.
ZenroomErrorCounter is a prometheus counter recording a count of any errors that occur when invoking zenroom.
ZenroomHistogram is a prometheus histogram recording execution times of calls to zenroom to exec some script.
# Structs
Processor is a type that encapsulates processing incoming events received from smartcitizen, and is responsible for enriching the data, applying any transformations to the data and then encrypting it using zenroom before writing it to the datastore.
# Interfaces
MovingAverager is an interface for a type that can return a moving average for the given device/sensor/interval.