Documentation
¶
Index ¶
- type GarbageCollector
- type MeasurementsStorage
- type PersistedMeasurement
- func (z *PersistedMeasurement) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *PersistedMeasurement) EncodeMsg(en *msgp.Writer) (err error)
- func (z *PersistedMeasurement) MarshalMsg(b []byte) (o []byte, err error)
- func (z *PersistedMeasurement) Msgsize() (s int)
- func (z *PersistedMeasurement) UnmarshalMsg(bts []byte) (o []byte, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GarbageCollector ¶
type GarbageCollector struct {
// contains filtered or unexported fields
}
func NewGarbageCollector ¶
func NewGarbageCollector(db *badger.DB) *GarbageCollector
func (*GarbageCollector) Run ¶
func (g *GarbageCollector) Run(ctx context.Context)
type MeasurementsStorage ¶
type MeasurementsStorage struct {
// contains filtered or unexported fields
}
func NewMeasurementsStorage ¶
func NewMeasurementsStorage(db *badger.DB) *MeasurementsStorage
func (*MeasurementsStorage) Add ¶
func (s *MeasurementsStorage) Add(m monitor.Measurement) error
func (*MeasurementsStorage) Get ¶
func (s *MeasurementsStorage) Get(id string, start, end query.Date) ([]monitor.Measurement, error)
func (*MeasurementsStorage) Last ¶
func (s *MeasurementsStorage) Last(id string) (monitor.Measurement, error)
type PersistedMeasurement ¶
type PersistedMeasurement struct { Id string `msg:"id"` UpdateEvery float64 `msg:"updateEvery"` Timestamp int64 `msg:"timestamp"` Duration float64 `msg:"duration"` Status string `msg:"status"` Output string `msg:"string"` }
func (*PersistedMeasurement) DecodeMsg ¶
func (z *PersistedMeasurement) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*PersistedMeasurement) EncodeMsg ¶
func (z *PersistedMeasurement) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*PersistedMeasurement) MarshalMsg ¶
func (z *PersistedMeasurement) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*PersistedMeasurement) Msgsize ¶
func (z *PersistedMeasurement) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*PersistedMeasurement) UnmarshalMsg ¶
func (z *PersistedMeasurement) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
Click to show internal directories.
Click to hide internal directories.