Add test code to metrics client, and fix metrics items process

Signed-off-by: root <danma@yunify.com>
This commit is contained in:
root
2021-01-22 14:50:49 +00:00
parent 8c86c9e1a5
commit 3095fd9403
13 changed files with 765 additions and 71 deletions

View File

@@ -35,8 +35,8 @@ type handler struct {
mo model.MonitoringOperator
}
func newHandler(k kubernetes.Interface, prometheusClient monitoring.Interface, metricsClient monitoring.Interface, f informers.InformerFactory, o openpitrix.Client) *handler {
return &handler{k, model.NewMonitoringOperator(prometheusClient, metricsClient, k, f, o)}
func newHandler(k kubernetes.Interface, monitoringClient monitoring.Interface, metricsClient monitoring.Interface, f informers.InformerFactory, o openpitrix.Client) *handler {
return &handler{k, model.NewMonitoringOperator(monitoringClient, metricsClient, k, f, o)}
}
func (h handler) handleKubeSphereMetricsQuery(req *restful.Request, resp *restful.Response) {