kubernetesk8s.io/kubernetes/pkg/kubelet/cadvisor Index | Files | Directories

package cadvisor

import "k8s.io/kubernetes/pkg/kubelet/cadvisor"

Kubelet interactions with cAdvisor.

Index

Functions

func CapacityFromMachineInfo

func CapacityFromMachineInfo(info *cadvisorapi.MachineInfo) v1.ResourceList

func EphemeralStorageCapacityFromFsInfo

func EphemeralStorageCapacityFromFsInfo(info cadvisorapi2.FsInfo) v1.ResourceList

Types

type ImageFsInfoProvider

type ImageFsInfoProvider interface {
	// ImageFsInfoLabel returns the label cAdvisor should use to find the filesystem holding container images.
	ImageFsInfoLabel() (string, error)
}

ImageFsInfoProvider informs cAdvisor how to find imagefs for container images.

func NewImageFsInfoProvider

func NewImageFsInfoProvider(runtime, runtimeEndpoint string) ImageFsInfoProvider

NewImageFsInfoProvider returns a provider for the specified runtime configuration.

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 container images.
	ImagesFsInfo() (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)

	// HasDedicatedImageFs returns true iff a dedicated image filesystem exists for storing images.
	HasDedicatedImageFs() (bool, error)

	// GetFsInfoByFsUUID returns the stats of the filesystem with the specified
	// uuid.
	GetFsInfoByFsUUID(uuid string) (cadvisorapiv2.FsInfo, error)
}

Interface is an abstract interface for testability. It abstracts the interface to cAdvisor.

func New

func New(address string, port uint, imageFsInfoProvider ImageFsInfoProvider, rootPath string) (Interface, error)

Source Files

cadvisor_unsupported.go doc.go helpers_unsupported.go types.go util.go

Directories

PathSynopsis
pkg/kubelet/cadvisor/testing
Version
v1.8.5-beta.0
Published
Nov 20, 2017
Platform
js/wasm
Imports
9 packages
Last checked
54 seconds ago

Tools for package owners.