temperature

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Monitor

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

func NewMonitor

func NewMonitor(sampler Sampler, sampleRate time.Duration) *Monitor

func (*Monitor) GetHistory

func (m *Monitor) GetHistory() []*Sample

func (*Monitor) Run

func (m *Monitor) Run()

func (*Monitor) Subscribe

func (m *Monitor) Subscribe() (uuid.UUID, chan *Sample)

func (*Monitor) Unsubscribe

func (m *Monitor) Unsubscribe(subId uuid.UUID)

type Sample

type Sample struct {
	Value      float32
	ObservedAt time.Time
}

type Sampler

type Sampler interface {
	Sample() (*Sample, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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