doorky

package module
v0.0.0-...-434bc62 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2016 License: BSD-3-Clause Imports: 4 Imported by: 0

README

doorky

The software used for checking and displaying the door status

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Timeseries

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

Timeseries is an object to access the stream of data points from

func NewTimeseries

func NewTimeseries(host string, timeout time.Duration,
	credentials []*CassandraCredentials, keyspace string) (
	*Timeseries, error)

NewTimeseries creates a new connection to the timeseries database.

func (*Timeseries) Insert

func (ts *Timeseries) Insert(door string, stamp time.Time, value bool) error

Insert a value into the time series. The value should record that the door status at the time "stamp" was "value" (true for open, false for closed).

func (*Timeseries) LastValue

func (ts *Timeseries) LastValue(door string) (
	stamp time.Time, value bool, err error)

LastValue looks up the most recent value of the specified time series.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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