16 lines
422 B
Go
16 lines
422 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(measuredValuesChannel chan<- []*types.MeasuredValue, errorChannel chan<- error, wg *sync.WaitGroup)
|
|
ReadContinously(ctx context.Context, measuredValuesChannel chan<- []*types.MeasuredValue, errorChannel chan<- error)
|
|
}
|