Versions in this module Expand all Collapse all v0 v0.1.1 Jul 3, 2021 v0.1.0 Jul 3, 2021 Changes in this version + type Context struct + Pipe ReadingsPipe + SensorID string + func NewReaderContext(parent context.Context, sensor Sensor) *Context + func (c *Context) Error(err error) + func (c *Context) Info(info string) + func (c *Context) Warning(msg string) + func (c *Context) WriterFor(metric models.Metric) *MetricWriter + type Factory interface + Build func(bus int) Sensor + func I2CFactory(factory func(addr uint16, bus int) Sensor, addr uint16) Factory + type FactoryFunc func(int) Sensor + func (f FactoryFunc) Build(bus int) Sensor + type MetricWriter struct + func (w *MetricWriter) Write(v interface{}) + func (w *MetricWriter) WriteWithError(value interface{}, err error) + type ReadingResult struct + Source string + Value float64 + type ReadingsPipe map[models.Metric]chan ReadingResult + type Sensor interface + Active func() bool + Close func() error + Harvest func(ctx *Context) + ID func() string + Init func() error + Metrics func() []models.Metric + Verify func() bool + type SensorsRegister map[string]Sensor + func (sr SensorsRegister) Exists(id string) bool + func (sr SensorsRegister) NotEmpty() bool + func (sr SensorsRegister) SupportedMetrics() models.Metrics + func (sr SensorsRegister) ToList() []Sensor + func (sr SensorsRegister) Union(sr2 SensorsRegister) SensorsRegister