feat(pkg): add logger and round direct over sensor interface
This commit is contained in:
@ -10,15 +10,15 @@ import (
|
||||
// HumiditySensor is a interface to describe required functions to measure humidities
|
||||
type HumiditySensor interface {
|
||||
GetSensorModel() types.SensorModel
|
||||
ReadHumidity() (*types.Humidity, error)
|
||||
ReadHumidityWriteIntoChannel(humidityChannel chan<- *types.Humidity, errorChannel chan<- error, wg *sync.WaitGroup)
|
||||
ReadHumidityContinously(ctx context.Context, humidityChannel chan<- *types.Humidity, errorChannel chan<- error)
|
||||
ReadHumidity(round float64) (*types.Humidity, error)
|
||||
ReadHumidityWriteIntoChannel(round float64, humidityChannel chan<- *types.Humidity, errorChannel chan<- error, wg *sync.WaitGroup)
|
||||
ReadHumidityContinously(ctx context.Context, round float64, humidityChannel chan<- *types.Humidity, errorChannel chan<- error)
|
||||
}
|
||||
|
||||
// TemperatureSensor is a interface to describe required functions to measure temperatures
|
||||
type TemperatureSensor interface {
|
||||
GetSensorModel() types.SensorModel
|
||||
ReadTemperature() (*types.Temperature, error)
|
||||
ReadTemperatureWriteIntoChannel(temperatureChannel chan<- *types.Temperature, errorChannel chan<- error, wg *sync.WaitGroup)
|
||||
ReadTemperatureContinously(ctx context.Context, temperatureChannel chan<- *types.Temperature, errorChannel chan<- error)
|
||||
ReadTemperature(round float64) (*types.Temperature, error)
|
||||
ReadTemperatureWriteIntoChannel(round float64, temperatureChannel chan<- *types.Temperature, errorChannel chan<- error, wg *sync.WaitGroup)
|
||||
ReadTemperatureContinously(ctx context.Context, round float64, temperatureChannel chan<- *types.Temperature, errorChannel chan<- error)
|
||||
}
|
||||
|
Reference in New Issue
Block a user