1. change glog to klog

2. move types to api package to avoid cyclic import
This commit is contained in:
Jeff
2019-09-16 12:46:53 +08:00
committed by zryfish
parent 79735c4543
commit 97c9a1786a
109 changed files with 1076 additions and 552 deletions

View File

@@ -18,8 +18,8 @@
package prometheus
import (
"github.com/golang/glog"
"io/ioutil"
"k8s.io/klog"
"net/http"
"time"
)
@@ -52,14 +52,14 @@ func (c *PrometheusClient) sendMonitoringRequest(endpoint string, queryType stri
epurl := endpoint + queryType + params
response, err := c.client.Get(epurl)
if err != nil {
glog.Error(err)
klog.Error(err)
} else {
defer response.Body.Close()
contents, err := ioutil.ReadAll(response.Body)
if err != nil {
glog.Error(err)
klog.Error(err)
}
return string(contents)
}