storage

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheReadings

func CacheReadings(readings ...models.MetricReadings) (err error)

CacheReadings stores models.MetricReadings into local cache DB.

func IterateOverCachedReadings

func IterateOverCachedReadings(ctx context.Context, fn ReadingsCacheIteratorFunc, pop bool)

IterateOverCachedReadings performs iteration over all cached models.MetricReadings records. allowing to `pop` them on fly.

Types

type ReadingsCacheIteratorFunc

type ReadingsCacheIteratorFunc func(key string, record models.MetricReadings) (toBreak bool, err error)

ReadingsCacheIteratorFunc defines function called by sensor readings cache iterator.

Jump to

Keyboard shortcuts

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