Documentation
¶
Overview ¶
Package persist provides logic for handling inbound readings and persisting them to a repository.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Logger *log.Logger
Readings Repository
}
The Config type contains fields used to configure a Persistor.
type Persistor ¶
type Persistor struct {
// contains filtered or unexported fields
}
The Persistor type is used to handle inbound readings and persist them to the Repository implementation.
func (*Persistor) HandleEvent ¶
HandleEvent handles an inbound JSON payload. It expects the payload to be unmarshallable into a storage.Reading type. Once decoded, the reading is persisted via the Repository implementation.
Click to show internal directories.
Click to hide internal directories.