mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2024-11-10 04:27:25 +01:00
Simplification
This commit is contained in:
parent
2f0e229936
commit
d6154ff35b
@ -246,15 +246,16 @@ func (c *metricAggregator) AddAggregation(name, function, condition string, tags
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var agg MetricAggregatorIntervalConfig
|
agg := &MetricAggregatorIntervalConfig{
|
||||||
agg.Name = name
|
Name: name,
|
||||||
agg.Condition = newcond
|
Condition: newcond,
|
||||||
agg.gvalCond = gvalCond
|
gvalCond: gvalCond,
|
||||||
agg.Function = newfunc
|
Function: newfunc,
|
||||||
agg.gvalFunc = gvalFunc
|
gvalFunc: gvalFunc,
|
||||||
agg.Tags = tags
|
Tags: tags,
|
||||||
agg.Meta = meta
|
Meta: meta,
|
||||||
c.functions = append(c.functions, &agg)
|
}
|
||||||
|
c.functions = append(c.functions, agg)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user