PKGBUILD/pkg/sensor/interfaces.go

16 lines
413 B
Go
Raw Normal View History

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)
}