start work on supporting metrics with a scope of hwthread

This commit is contained in:
Lou Knauer
2022-01-07 09:47:41 +01:00
parent 3f88e512f0
commit e581bfc70f
4 changed files with 235 additions and 43 deletions

View File

@@ -156,6 +156,19 @@ func GetClusterConfig(cluster string) *model.Cluster {
return nil
}
func GetPartition(cluster, partition string) *model.Partition {
for _, c := range Clusters {
if c.Name == cluster {
for _, p := range c.Partitions {
if p.Name == partition {
return p
}
}
}
}
return nil
}
func GetMetricConfig(cluster, metric string) *model.MetricConfig {
for _, c := range Clusters {
if c.Name == cluster {