Raw network handler

Raw handler now parses an optional json file with the network interface information, and emits network stats.
It is doing that, actually. It will return a nil containerHint and the
error in case of an issue. This seems like the standard behavior of most
functions.
On Oct 15, 2014 2:46 PM, "Victor Marmol" <notifications@github.com> wrote:

> In container/raw/container_hints.go:
>
> > +	AllHosts []containerHint `json:"all_hosts,omitempty"`
> > +}
> > +
> > +type containerHint struct {
> > +	FullPath                string `json:"full_path,omitempty"`
> > +	NetworkInterface *networkInterface `json:"network_interface,omitempty"`
> > +}
> > +
> > +type networkInterface struct {
> > +	VethHost  string `json:"veth_host,omitempty"`
> > +	VethChild string `json:"veth_child,omitempty"`
> > +	NsPath    string `json:"ns_path,omitempty"`
> > +}
> > +
> > +func getContainerHintsFromFile(containerHintsFile string) (containerHints, error) {
> > +	dat, err := ioutil.ReadFile(containerHintsFile)
>
> When this file does not exist this will return an error. We probably want
> to catch that and return an empty containerHints
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/google/cadvisor/pull/270/files#r18925463>.
>