db

package
v0.0.0-...-7d7a026 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

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 (*MeasurementsStorage) Get

func (s *MeasurementsStorage) Get(id string, start, end query.Date) ([]monitor.Measurement, error)

func (*MeasurementsStorage) Last

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL