sensorstore

package
v0.0.0-...-fca2820 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SensorValues

type SensorValues struct {
	Temperature, Humidity float32
}

type Store

type Store struct {
	// contains filtered or unexported fields
}

func New

func New(db *bolt.DB, resolution time.Duration) (*Store, error)

func (*Store) ReadLastValue

func (s *Store) ReadLastValue(sensorID string) (*TimedSensorValues, error)

func (*Store) ReadValues

func (s *Store) ReadValues(sensorID string, duration time.Duration) ([]*TimedSensorValues, error)

func (*Store) StoreValues

func (s *Store) StoreValues(sensorID string, values SensorValues) error

func (*Store) StoreValuesChannel

func (s *Store) StoreValuesChannel(sensorID string) (chan SensorValues, error)

type TimedSensorValues

type TimedSensorValues struct {
	Timestamp time.Time
	Values    SensorValues
}

Jump to

Keyboard shortcuts

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