This repository has been archived on 2025-08-11. You can view files and clone it, but cannot push or open issues or pull requests.
Files
PKGBUILD/pkg/sensor/interfaces.go
Markus Pesch dbef4f8241 fix(pkg/config): use storage endpoints
changes:
- Only one storage endpoint can be defined. This consists of a URL which
  can be used to specify whether the data is to be stored in a file or
  in a database.
2019-12-08 12:49:21 +01:00

16 lines
416 B
Go

package sensor
import (
"context"
"sync"
"github.com/go-flucky/flucky/pkg/types"
)
type Sensor interface {
GetSensorModel() types.SensorModel
Read() ([]*types.MeasuredValue, error)
ReadChannel(measuredValueChannel chan<- *types.MeasuredValue, errorChannel chan<- error, wg *sync.WaitGroup)
ReadContinously(ctx context.Context, measuredValueChannel chan<- *types.MeasuredValue, errorChannel chan<- error)
}