chore: refactor metrics endpoint

refactoring is needed to make the metrics package usable from within the
runner package for further metrics.

This change also makes the metric-collector independent from requests to
the /metrics endpoint

Signed-off-by: Mario Constanti <mario.constanti@mercedes-benz.com>
This commit is contained in:
Mario Constanti 2024-02-19 16:22:32 +01:00
parent f68cf98d67
commit 1d8d9459eb
21 changed files with 564 additions and 590 deletions

View file

@ -456,8 +456,9 @@ func (t *TLSConfig) Validate() error {
}
type Metrics struct {
DisableAuth bool `toml:"disable_auth" json:"disable-auth"`
Enable bool `toml:"enable" json:"enable"`
DisableAuth bool `toml:"disable_auth" json:"disable-auth"`
Enable bool `toml:"enable" json:"enable"`
Period time.Duration `toml:"period" json:"period"`
}
// APIServer holds configuration for the API server