Documentation
¶
Overview ¶
Kubelet interactions with cAdvisor.
Index ¶
- func CapacityFromMachineInfo(info *cadvisorApi.MachineInfo) api.ResourceList
- type Fake
- func (c *Fake) ContainerInfo(name string, req *cadvisorapi.ContainerInfoRequest) (*cadvisorapi.ContainerInfo, error)
- func (c *Fake) ContainerInfoV2(name string, options cadvisorapiv2.RequestOptions) (map[string]cadvisorapiv2.ContainerInfo, error)
- func (c *Fake) DockerContainer(name string, req *cadvisorapi.ContainerInfoRequest) (cadvisorapi.ContainerInfo, error)
- func (c *Fake) DockerImagesFsInfo() (cadvisorapiv2.FsInfo, error)
- func (c *Fake) MachineInfo() (*cadvisorapi.MachineInfo, error)
- func (c *Fake) RootFsInfo() (cadvisorapiv2.FsInfo, error)
- func (c *Fake) Start() error
- func (c *Fake) SubcontainerInfo(name string, req *cadvisorapi.ContainerInfoRequest) (map[string]*cadvisorapi.ContainerInfo, error)
- func (c *Fake) VersionInfo() (*cadvisorapi.VersionInfo, error)
- func (c *Fake) WatchEvents(request *events.Request) (*events.EventChannel, error)
- type Interface
- type Mock
- func (c *Mock) ContainerInfo(name string, req *cadvisorapi.ContainerInfoRequest) (*cadvisorapi.ContainerInfo, error)
- func (c *Mock) ContainerInfoV2(name string, options cadvisorapiv2.RequestOptions) (map[string]cadvisorapiv2.ContainerInfo, error)
- func (c *Mock) DockerContainer(name string, req *cadvisorapi.ContainerInfoRequest) (cadvisorapi.ContainerInfo, error)
- func (c *Mock) DockerImagesFsInfo() (cadvisorapiv2.FsInfo, error)
- func (c *Mock) MachineInfo() (*cadvisorapi.MachineInfo, error)
- func (c *Mock) RootFsInfo() (cadvisorapiv2.FsInfo, error)
- func (c *Mock) Start() error
- func (c *Mock) SubcontainerInfo(name string, req *cadvisorapi.ContainerInfoRequest) (map[string]*cadvisorapi.ContainerInfo, error)
- func (c *Mock) VersionInfo() (*cadvisorapi.VersionInfo, error)
- func (c *Mock) WatchEvents(request *events.Request) (*events.EventChannel, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CapacityFromMachineInfo ¶ added in v1.2.0
func CapacityFromMachineInfo(info *cadvisorApi.MachineInfo) api.ResourceList
Types ¶
type Fake ¶ added in v0.13.1
type Fake struct { }
Fake cAdvisor implementation.
func (*Fake) ContainerInfo ¶ added in v0.13.1
func (c *Fake) ContainerInfo(name string, req *cadvisorapi.ContainerInfoRequest) (*cadvisorapi.ContainerInfo, error)
func (*Fake) ContainerInfoV2 ¶
func (c *Fake) ContainerInfoV2(name string, options cadvisorapiv2.RequestOptions) (map[string]cadvisorapiv2.ContainerInfo, error)
func (*Fake) DockerContainer ¶ added in v0.13.1
func (c *Fake) DockerContainer(name string, req *cadvisorapi.ContainerInfoRequest) (cadvisorapi.ContainerInfo, error)
func (*Fake) DockerImagesFsInfo ¶ added in v0.14.0
func (c *Fake) DockerImagesFsInfo() (cadvisorapiv2.FsInfo, error)
func (*Fake) MachineInfo ¶ added in v0.13.1
func (c *Fake) MachineInfo() (*cadvisorapi.MachineInfo, error)
func (*Fake) RootFsInfo ¶ added in v0.18.0
func (c *Fake) RootFsInfo() (cadvisorapiv2.FsInfo, error)
func (*Fake) SubcontainerInfo ¶ added in v0.16.1
func (c *Fake) SubcontainerInfo(name string, req *cadvisorapi.ContainerInfoRequest) (map[string]*cadvisorapi.ContainerInfo, error)
func (*Fake) VersionInfo ¶ added in v0.15.0
func (c *Fake) VersionInfo() (*cadvisorapi.VersionInfo, error)
func (*Fake) WatchEvents ¶ added in v0.17.0
type Interface ¶
type Interface interface { Start() error DockerContainer(name string, req *cadvisorapi.ContainerInfoRequest) (cadvisorapi.ContainerInfo, error) ContainerInfo(name string, req *cadvisorapi.ContainerInfoRequest) (*cadvisorapi.ContainerInfo, error) ContainerInfoV2(name string, options cadvisorapiv2.RequestOptions) (map[string]cadvisorapiv2.ContainerInfo, error) SubcontainerInfo(name string, req *cadvisorapi.ContainerInfoRequest) (map[string]*cadvisorapi.ContainerInfo, error) MachineInfo() (*cadvisorapi.MachineInfo, error) VersionInfo() (*cadvisorapi.VersionInfo, error) // Returns usage information about the filesystem holding Docker images. DockerImagesFsInfo() (cadvisorapiv2.FsInfo, error) // Returns usage information about the root filesystem. RootFsInfo() (cadvisorapiv2.FsInfo, error) // Get events streamed through passedChannel that fit the request. WatchEvents(request *events.Request) (*events.EventChannel, error) }
Interface is an abstract interface for testability. It abstracts the interface to cAdvisor.
type Mock ¶
func (*Mock) ContainerInfo ¶
func (c *Mock) ContainerInfo(name string, req *cadvisorapi.ContainerInfoRequest) (*cadvisorapi.ContainerInfo, error)
ContainerInfo is a mock implementation of Interface.ContainerInfo.
func (*Mock) ContainerInfoV2 ¶
func (c *Mock) ContainerInfoV2(name string, options cadvisorapiv2.RequestOptions) (map[string]cadvisorapiv2.ContainerInfo, error)
ContainerInfoV2 is a mock implementation of Interface.ContainerInfoV2.
func (*Mock) DockerContainer ¶
func (c *Mock) DockerContainer(name string, req *cadvisorapi.ContainerInfoRequest) (cadvisorapi.ContainerInfo, error)
DockerContainer is a mock implementation of Interface.DockerContainer.
func (*Mock) DockerImagesFsInfo ¶ added in v0.14.0
func (c *Mock) DockerImagesFsInfo() (cadvisorapiv2.FsInfo, error)
func (*Mock) MachineInfo ¶
func (c *Mock) MachineInfo() (*cadvisorapi.MachineInfo, error)
MachineInfo is a mock implementation of Interface.MachineInfo.
func (*Mock) RootFsInfo ¶ added in v0.18.0
func (c *Mock) RootFsInfo() (cadvisorapiv2.FsInfo, error)
func (*Mock) SubcontainerInfo ¶ added in v0.16.1
func (c *Mock) SubcontainerInfo(name string, req *cadvisorapi.ContainerInfoRequest) (map[string]*cadvisorapi.ContainerInfo, error)
func (*Mock) VersionInfo ¶ added in v0.15.0
func (c *Mock) VersionInfo() (*cadvisorapi.VersionInfo, error)
func (*Mock) WatchEvents ¶ added in v0.17.0
Click to show internal directories.
Click to hide internal directories.