package raw
import "k8s.io/kubernetes/Godeps/_workspace/src/github.com/google/cadvisor/container/raw"
Unmarshal's a Containers description json file. The json file contains an array of ContainerHint structs, each with a container's id and networkInterface This allows collecting stats about network interfaces configured outside docker and lxc
Handler for "raw" containers.
Index ¶
- func Register(machineInfoFactory info.MachineInfoFactory, fsInfo fs.FsInfo) error
- type InotifyWatcher
- func NewInotifyWatcher() (*InotifyWatcher, error)
- func (iw *InotifyWatcher) AddWatch(containerName, dir string) (bool, error)
- func (iw *InotifyWatcher) Close() error
- func (iw *InotifyWatcher) Error() chan error
- func (iw *InotifyWatcher) Event() chan *inotify.Event
- func (iw *InotifyWatcher) GetWatches() map[string][]string
- func (iw *InotifyWatcher) RemoveWatch(containerName, dir string) (bool, error)
Functions ¶
func Register ¶
func Register(machineInfoFactory info.MachineInfoFactory, fsInfo fs.FsInfo) error
Types ¶
type InotifyWatcher ¶
type InotifyWatcher struct {
// contains filtered or unexported fields
}
Watcher for container-related inotify events in the cgroup hierarchy.
Implementation is thread-safe.
func NewInotifyWatcher ¶
func NewInotifyWatcher() (*InotifyWatcher, error)
func (*InotifyWatcher) AddWatch ¶
func (iw *InotifyWatcher) AddWatch(containerName, dir string) (bool, error)
Add a watch to the specified directory. Returns if the container was already being watched.
func (*InotifyWatcher) Close ¶
func (iw *InotifyWatcher) Close() error
Closes the inotify watcher.
func (*InotifyWatcher) Error ¶
func (iw *InotifyWatcher) Error() chan error
Errors are returned on this channel.
func (*InotifyWatcher) Event ¶
func (iw *InotifyWatcher) Event() chan *inotify.Event
Events are returned on this channel.
func (*InotifyWatcher) GetWatches ¶
func (iw *InotifyWatcher) GetWatches() map[string][]string
Returns a map of containers to the cgroup paths being watched.
func (*InotifyWatcher) RemoveWatch ¶
func (iw *InotifyWatcher) RemoveWatch(containerName, dir string) (bool, error)
Remove watch from the specified directory. Returns if this was the last watch on the specified container.
Source Files ¶
container_hints.go factory.go handler.go inotify_watcher.go
- Version
- v1.1.9-beta.0
- Published
- Feb 23, 2016
- Platform
- linux/amd64
- Imports
- 21 packages
- Last checked
- 3 minutes ago –
Tools for package owners.