 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Overview ¶
Manager of cAdvisor-monitored containers.
Index ¶
- Variables
- type DockerImage
- type DockerStatus
- type Manager
- type ManagerMock
- func (c *ManagerMock) AllDockerContainers(query *info.ContainerInfoRequest) (map[string]info.ContainerInfo, error)
- func (c *ManagerMock) DockerContainer(name string, query *info.ContainerInfoRequest) (info.ContainerInfo, error)
- func (c *ManagerMock) DockerImages() ([]DockerImage, error)
- func (c *ManagerMock) DockerInfo() (DockerStatus, error)
- func (c *ManagerMock) Exists(name string) bool
- func (c *ManagerMock) GetContainerInfo(name string, query *info.ContainerInfoRequest) (*info.ContainerInfo, error)
- func (c *ManagerMock) GetContainerSpec(containerName string, options v2.RequestOptions) (map[string]v2.ContainerSpec, error)
- func (c *ManagerMock) GetDerivedStats(containerName string, options v2.RequestOptions) (map[string]v2.DerivedStats, error)
- func (c *ManagerMock) GetFsInfo() ([]v2.FsInfo, error)
- func (c *ManagerMock) GetMachineInfo() (*info.MachineInfo, error)
- func (c *ManagerMock) GetPastEvents(queryuest *events.Request) ([]*info.Event, error)
- func (c *ManagerMock) GetProcessList(name string, options v2.RequestOptions) ([]v2.ProcessInfo, error)
- func (c *ManagerMock) GetRequestedContainersInfo(containerName string, options v2.RequestOptions) (map[string]*info.ContainerInfo, error)
- func (c *ManagerMock) GetVersionInfo() (*info.VersionInfo, error)
- func (c *ManagerMock) Start() error
- func (c *ManagerMock) Stop() error
- func (c *ManagerMock) SubcontainersInfo(containerName string, query *info.ContainerInfoRequest) ([]*info.ContainerInfo, error)
- func (c *ManagerMock) WatchForEvents(queryuest *events.Request, passedChannel chan *info.Event) error
 
Constants ¶
This section is empty.
Variables ¶
      View Source
      
  
    var CpuClockSpeedMHz = regexp.MustCompile("cpu MHz\\t*: +([0-9]+.[0-9]+)")
    
      View Source
      
  var HousekeepingInterval = flag.Duration("housekeeping_interval", 1*time.Second, "Interval between container housekeepings")
    Housekeeping interval.
Functions ¶
This section is empty.
Types ¶
type DockerImage ¶ added in v0.18.0
type DockerStatus ¶ added in v0.18.0
type DockerStatus struct {
	Version       string            `json:"version"`
	KernelVersion string            `json:"kernel_version"`
	OS            string            `json:"os"`
	Hostname      string            `json:"hostname"`
	RootDir       string            `json:"root_dir"`
	Driver        string            `json:"driver"`
	DriverStatus  map[string]string `json:"driver_status"`
	ExecDriver    string            `json:"exec_driver"`
	NumImages     int               `json:"num_images"`
	NumContainers int               `json:"num_containers"`
}
    type Manager ¶
type Manager interface {
	// Start the manager. Calling other manager methods before this returns
	// may produce undefined behavior.
	Start() error
	// Stops the manager.
	Stop() error
	// Get information about a container.
	GetContainerInfo(containerName string, query *info.ContainerInfoRequest) (*info.ContainerInfo, error)
	// Get information about all subcontainers of the specified container (includes self).
	SubcontainersInfo(containerName string, query *info.ContainerInfoRequest) ([]*info.ContainerInfo, error)
	// Gets all the Docker containers. Return is a map from full container name to ContainerInfo.
	AllDockerContainers(query *info.ContainerInfoRequest) (map[string]info.ContainerInfo, error)
	// Gets information about a specific Docker container. The specified name is within the Docker namespace.
	DockerContainer(dockerName string, query *info.ContainerInfoRequest) (info.ContainerInfo, error)
	// Gets spec for all containers based on request options.
	GetContainerSpec(containerName string, options v2.RequestOptions) (map[string]v2.ContainerSpec, error)
	// Gets summary stats for all containers based on request options.
	GetDerivedStats(containerName string, options v2.RequestOptions) (map[string]v2.DerivedStats, error)
	// Get info for all requested containers based on the request options.
	GetRequestedContainersInfo(containerName string, options v2.RequestOptions) (map[string]*info.ContainerInfo, error)
	// Returns true if the named container exists.
	Exists(containerName string) bool
	// Get information about the machine.
	GetMachineInfo() (*info.MachineInfo, error)
	// Get version information about different components we depend on.
	GetVersionInfo() (*info.VersionInfo, error)
	// Get filesystem information for a given label.
	// Returns information for all global filesystems if label is empty.
	GetFsInfo(label string) ([]v2.FsInfo, error)
	// Get ps output for a container.
	GetProcessList(containerName string, options v2.RequestOptions) ([]v2.ProcessInfo, error)
	// Get events streamed through passedChannel that fit the request.
	WatchForEvents(request *events.Request) (*events.EventChannel, error)
	// Get past events that have been detected and that fit the request.
	GetPastEvents(request *events.Request) ([]*info.Event, error)
	CloseEventChannel(watch_id int)
	// Get status information about docker.
	DockerInfo() (DockerStatus, error)
	// Get details about interesting docker images.
	DockerImages() ([]DockerImage, error)
	// Returns debugging information. Map of lines per category.
	DebugInfo() map[string][]string
}
    The Manager interface defines operations for starting a manager and getting container and machine information.
type ManagerMock ¶
func (*ManagerMock) AllDockerContainers ¶
func (c *ManagerMock) AllDockerContainers(query *info.ContainerInfoRequest) (map[string]info.ContainerInfo, error)
func (*ManagerMock) DockerContainer ¶
func (c *ManagerMock) DockerContainer(name string, query *info.ContainerInfoRequest) (info.ContainerInfo, error)
func (*ManagerMock) DockerImages ¶ added in v0.18.0
func (c *ManagerMock) DockerImages() ([]DockerImage, error)
func (*ManagerMock) DockerInfo ¶ added in v0.18.0
func (c *ManagerMock) DockerInfo() (DockerStatus, error)
func (*ManagerMock) Exists ¶ added in v0.17.0
func (c *ManagerMock) Exists(name string) bool
func (*ManagerMock) GetContainerInfo ¶
func (c *ManagerMock) GetContainerInfo(name string, query *info.ContainerInfoRequest) (*info.ContainerInfo, error)
func (*ManagerMock) GetContainerSpec ¶
func (c *ManagerMock) GetContainerSpec(containerName string, options v2.RequestOptions) (map[string]v2.ContainerSpec, error)
func (*ManagerMock) GetDerivedStats ¶ added in v0.14.0
func (c *ManagerMock) GetDerivedStats(containerName string, options v2.RequestOptions) (map[string]v2.DerivedStats, error)
func (*ManagerMock) GetFsInfo ¶ added in v0.13.1
func (c *ManagerMock) GetFsInfo() ([]v2.FsInfo, error)
func (*ManagerMock) GetMachineInfo ¶
func (c *ManagerMock) GetMachineInfo() (*info.MachineInfo, error)
func (*ManagerMock) GetPastEvents ¶
func (*ManagerMock) GetProcessList ¶ added in v0.18.0
func (c *ManagerMock) GetProcessList(name string, options v2.RequestOptions) ([]v2.ProcessInfo, error)
func (*ManagerMock) GetRequestedContainersInfo ¶ added in v0.14.0
func (c *ManagerMock) GetRequestedContainersInfo(containerName string, options v2.RequestOptions) (map[string]*info.ContainerInfo, error)
func (*ManagerMock) GetVersionInfo ¶
func (c *ManagerMock) GetVersionInfo() (*info.VersionInfo, error)
func (*ManagerMock) Start ¶
func (c *ManagerMock) Start() error
func (*ManagerMock) Stop ¶
func (c *ManagerMock) Stop() error
func (*ManagerMock) SubcontainersInfo ¶
func (c *ManagerMock) SubcontainersInfo(containerName string, query *info.ContainerInfoRequest) ([]*info.ContainerInfo, error)
func (*ManagerMock) WatchForEvents ¶
 Click to show internal directories. 
   Click to hide internal directories.