Made changes to client docs as recommended by @vmarmol
This commit is contained in:
parent
52b2f837af
commit
803a288a62
@ -133,7 +133,7 @@ There is an example Go client under [client/](client/) - you can use it on your
|
||||
```go
|
||||
import "github.com/google/cadvisor/client"
|
||||
client, err = client.NewClient("http://192.168.59.103:8080/")
|
||||
mInfo, _ := client.MachineInfo()
|
||||
mInfo, err := client.MachineInfo()
|
||||
```
|
||||
|
||||
## Roadmap
|
||||
|
@ -1,12 +1,12 @@
|
||||
# Example REST API Client
|
||||
|
||||
This is an implementation of a cadvisor REST API in Go. You can use it like this:
|
||||
This is an implementation of a cAdvisor REST API in Go. You can use it like this:
|
||||
|
||||
```go
|
||||
client, err := client.NewClient("http://192.168.59.103:8080/")
|
||||
```
|
||||
|
||||
Obviously, replace the URL with the path to your actual cadvisor REST endpoint.
|
||||
Obviously, replace the URL with the path to your actual cAdvisor REST endpoint.
|
||||
|
||||
|
||||
### MachineInfo
|
||||
@ -30,6 +30,8 @@ This method returns a cadvisor/info.MachineInfo struct with all the fields fille
|
||||
})
|
||||
```
|
||||
|
||||
You can see the full specification of the [MachineInfo struct in the source](../info/container.go)
|
||||
|
||||
### ContainerInfo
|
||||
|
||||
Given a container name and a ContainerInfoRequest, will return all information about the specified container. The ContainerInfoRequest struct just has one field, NumStats, which is the number of stat entries that you want returned.
|
||||
|
Loading…
Reference in New Issue
Block a user