change collector readme, fix url path (#98)

* change collector readme, fix url path

* add error return

* fix word mistake

* optimization code
This commit is contained in:
penggy 2020-04-19 00:11:16 +08:00 committed by GitHub
parent e32b8e44d1
commit 8790094b15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 5 deletions

View File

@ -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:
{

View File

@ -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)

View File

@ -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")
}

View File

@ -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