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.
This commit is contained in:
@ -4,13 +4,13 @@ import (
|
||||
"github.com/go-flucky/flucky/pkg/types"
|
||||
)
|
||||
|
||||
func MeasuredValues(measuredValuesChannel <-chan []*types.MeasuredValue) []*types.MeasuredValue {
|
||||
func MeasuredValues(measuredValueChannel <-chan *types.MeasuredValue) []*types.MeasuredValue {
|
||||
cachedMeasuredValues := make([]*types.MeasuredValue, 0)
|
||||
for {
|
||||
select {
|
||||
case measuredValues, more := <-measuredValuesChannel:
|
||||
case measuredValue, more := <-measuredValueChannel:
|
||||
if more {
|
||||
cachedMeasuredValues = append(cachedMeasuredValues, measuredValues...)
|
||||
cachedMeasuredValues = append(cachedMeasuredValues, measuredValue)
|
||||
continue
|
||||
}
|
||||
default:
|
||||
|
Reference in New Issue
Block a user