Made changes to client docs as recommended by @vmarmol

This commit is contained in:
Kevin McCarthy 2014-10-20 08:42:03 -10:00
parent 52b2f837af
commit 803a288a62
2 changed files with 5 additions and 3 deletions

View File

@ -133,7 +133,7 @@ There is an example Go client under [client/](client/) - you can use it on your
```go ```go
import "github.com/google/cadvisor/client" import "github.com/google/cadvisor/client"
client, err = client.NewClient("http://192.168.59.103:8080/") client, err = client.NewClient("http://192.168.59.103:8080/")
mInfo, _ := client.MachineInfo() mInfo, err := client.MachineInfo()
``` ```
## Roadmap ## Roadmap

View File

@ -1,12 +1,12 @@
# Example REST API Client # 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 ```go
client, err := client.NewClient("http://192.168.59.103:8080/") 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 ### 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 ### 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. 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.