Add more metrics to the IAM Folder Reconciler (#111275)
* Add more metrics to the operator * Add namespace when logging metrics * Skip flaky test
This commit is contained in:
+11
-1
@@ -1,16 +1,26 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
|
||||
"github.com/grafana/grafana/pkg/services/apiserver/standalone"
|
||||
"github.com/grafana/grafana/pkg/setting"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
// OperatorDependencies contains all the dependencies that operators need
|
||||
type OperatorDependencies struct {
|
||||
BuildInfo standalone.BuildInfo
|
||||
CLIContext *cli.Context
|
||||
Config *setting.Cfg
|
||||
Registerer prometheus.Registerer
|
||||
}
|
||||
|
||||
// Operator represents an app operator that is available in the Grafana binary
|
||||
type Operator struct {
|
||||
Name string
|
||||
Description string
|
||||
RunFunc func(standalone.BuildInfo, *cli.Context, *setting.Cfg) error
|
||||
RunFunc func(deps OperatorDependencies) error
|
||||
}
|
||||
|
||||
var operatorsRegistry []Operator
|
||||
|
||||
Reference in New Issue
Block a user