Trial and Test MetricStore components

This commit is contained in:
Aditya Ujeniya
2025-09-08 22:54:13 +02:00
parent 62565b9ae2
commit af43901ca3
34 changed files with 394 additions and 219 deletions

View File

@@ -97,10 +97,10 @@ func InitMetricStore(msConfig json.RawMessage) {
}
}
func (c *MetricStoreConfig) GetMetricFrequency(metricName string) (int64, error) {
// if metric, ok := c.Metrics[metricName]; ok {
// return metric.Frequency, nil
// }
func GetMetricFrequency(metricName string) (int64, error) {
if metric, ok := Metrics[metricName]; ok {
return metric.Frequency, nil
}
return 0, fmt.Errorf("[METRICSTORE]> metric %s not found", metricName)
}