From 803a288a6265c0b3b349b408812da7c16beb5ea6 Mon Sep 17 00:00:00 2001 From: Kevin McCarthy Date: Mon, 20 Oct 2014 08:42:03 -1000 Subject: [PATCH] Made changes to client docs as recommended by @vmarmol --- README.md | 2 +- client/README.md | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index af337c21..34a86327 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/client/README.md b/client/README.md index 56ea9613..fededef1 100644 --- a/client/README.md +++ b/client/README.md @@ -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.