Documentation ¶
Index ¶
- func GetAnyRecordFiles(directory string, subdir bool) ([]string, error)
- func GetRecordFiles(directory, prefix string, start, end time.Time) ([]string, error)
- func Int64Bytes(value int64) []byte
- func IntObsFromBytes(value []byte) (*nwpd.IntObservation, error)
- func IntObsToBytes(o *nwpd.IntObservation) ([]byte, error)
- func IntObsToObservation(o *nwpd.IntObservation, idMap *StringIDMap) (*nwpd.Observation, error)
- func IterateRecordFile(filename string, visitor ObservationVisitor) error
- func NewObsWriter(log logrus.FieldLogger, directory, prefix string, retentionHours int) (nwpd.ObservationWriter, error)
- func ToIntObservation(obs *nwpd.Observation, idMap *StringIDMap, persistor IntStringPersistor) (*nwpd.IntObservation, error)
- type IntString
- type IntStringPersistor
- type ObservationVisitor
- type StringIDMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAnyRecordFiles ¶
GetAnyRecordFiles gets all observation record files.
func GetRecordFiles ¶
GetRecordFiles gets all observation record files.
func Int64Bytes ¶
func IntObsFromBytes ¶
func IntObsFromBytes(value []byte) (*nwpd.IntObservation, error)
func IntObsToBytes ¶
func IntObsToBytes(o *nwpd.IntObservation) ([]byte, error)
func IntObsToObservation ¶
func IntObsToObservation(o *nwpd.IntObservation, idMap *StringIDMap) (*nwpd.Observation, error)
func IterateRecordFile ¶
func IterateRecordFile(filename string, visitor ObservationVisitor) error
func NewObsWriter ¶
func NewObsWriter(log logrus.FieldLogger, directory, prefix string, retentionHours int) (nwpd.ObservationWriter, error)
func ToIntObservation ¶
func ToIntObservation(obs *nwpd.Observation, idMap *StringIDMap, persistor IntStringPersistor) (*nwpd.IntObservation, error)
Types ¶
type IntString ¶
type IntString struct {
// contains filtered or unexported fields
}
func NewVarint2String ¶
func (*IntString) ValueBytes ¶
type IntStringPersistor ¶
type ObservationVisitor ¶
type ObservationVisitor func(obs *nwpd.Observation) error
type StringIDMap ¶
type StringIDMap struct {
// contains filtered or unexported fields
}
func NewStringIDMap ¶
func NewStringIDMap() *StringIDMap
func NewStringIDMapFromData ¶
func NewStringIDMapFromData(data []*IntString) *StringIDMap
func (*StringIDMap) Append ¶
func (m *StringIDMap) Append(item *IntString) error
func (*StringIDMap) GetKey ¶
func (m *StringIDMap) GetKey(persistor IntStringPersistor, s string) (int64, error)
Click to show internal directories.
Click to hide internal directories.