未验证 提交 8790094b 编写于 作者: P penggy 提交者: GitHub

change collector readme, fix url path (#98)

* change collector readme, fix url path

* add error return

* fix word mistake

* optimization code
上级 e32b8e44
......@@ -9,7 +9,7 @@ linux 服务器基础资源采集agent
#### 上报数据
```
POST /api/push
POST /api/collector/push
request body:
// endpoint 可以填ip或者hostname, 如果ip是在运维平台是唯一表示, 那就填ip, hostname类同
......@@ -38,7 +38,7 @@ response body:
#### 获取已生效的采集策略
```
GET /api/stra
GET /api/collector/stra
response body:
{
......
......@@ -93,6 +93,9 @@ func UnTarGz(srcFilePath string, destDirPath string) error {
// Gzip reader
gr, err := gzip.NewReader(fr)
if err != nil {
return err
}
// Tar reader
tr := tar.NewReader(gr)
......
......@@ -156,6 +156,5 @@ func function(pc uintptr) []byte {
}
func timeFormat(t time.Time) string {
var timeString = t.Format("2006/01/02 - 15:04:05")
return timeString
return t.Format("2006/01/02 - 15:04:05")
}
......@@ -168,7 +168,7 @@ func (cp *ConnPools) UpdatePools(addrs []string) []string {
return newAddrs
}
// RpcCient implements the io.Closer interface
// RpcClient implements the io.Closer interface
type RpcClient struct {
cli *rpc.Client
name string
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册