Documentation ¶
Index ¶
- Constants
- func EnsureContainerSystemCpuDir(cpuDir string, cpuCount int64) error
- func EnsureDir(dir string) error
- func EnsureFile(filename string, content string, mod string) error
- type CRI
- type CgroupUtil
- type ContainerCPU
- type HostContainerCPU
- type HostContainerCPUMap
- type ListContainerOptions
- type ListPodOptions
- type RunContainersResponse
Constants ¶
View Source
const (
CGROUP_PATH_SYSFS = "/sys/fs/cgroup"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CRI ¶
type CRI interface { Version(ctx context.Context) (*runtimeapi.VersionResponse, error) ListPods(ctx context.Context, opts ListPodOptions) ([]*runtimeapi.PodSandbox, error) RunPod(ctx context.Context, podConfig *runtimeapi.PodSandboxConfig, runtimeHandler string) (string, error) StopPod(ctx context.Context, req *runtimeapi.StopPodSandboxRequest) error RemovePod(ctx context.Context, podId string) error CreateContainer(ctx context.Context, podId string, podConfig *runtimeapi.PodSandboxConfig, ctrConfig *runtimeapi.ContainerConfig, withPull bool) (string, error) StartContainer(ctx context.Context, id string) error StopContainer(ctx context.Context, ctrId string, timeout int64) error RemoveContainer(ctx context.Context, ctrId string) error RunContainers(ctx context.Context, podConfig *runtimeapi.PodSandboxConfig, containerConfigs []*runtimeapi.ContainerConfig, runtimeHandler string) (*RunContainersResponse, error) ListContainers(ctx context.Context, opts ListContainerOptions) ([]*runtimeapi.Container, error) ContainerStatus(ctx context.Context, ctrId string) (*runtimeapi.ContainerStatusResponse, error) ListImages(ctx context.Context, filter *runtimeapi.ImageFilter) ([]*runtimeapi.Image, error) PullImage(ctx context.Context, req *runtimeapi.PullImageRequest) (*runtimeapi.PullImageResponse, error) ImageStatus(ctx context.Context, req *runtimeapi.ImageStatusRequest) (*runtimeapi.ImageStatusResponse, error) // lower layer client GetImageClient() runtimeapi.ImageServiceClient GetRuntimeClient() runtimeapi.RuntimeServiceClient }
type CgroupUtil ¶
type CgroupUtil interface { SetMemoryLimitBytes(ctrId string, bytes int64) error SetCPUCfs(ctrId string, quota int64, period int64) error SetDevicesAllow(ctrId string, allows []string) error SetPidsMax(ctrId string, max int) error }
func NewPodCgroupV1Util ¶
func NewPodCgroupV1Util(parentPath string) CgroupUtil
type ContainerCPU ¶
func NewContainerCPU ¶
func NewContainerCPU(ctrId string, ctrIdx int) *ContainerCPU
type HostContainerCPU ¶
type HostContainerCPU struct { Index int `json:"index"` Containers map[string][]*ContainerCPU `json:"containers"` }
func NewHostContainerCPU ¶
func NewHostContainerCPU(hostIndex int) *HostContainerCPU
func (*HostContainerCPU) DeleteContainer ¶
func (h *HostContainerCPU) DeleteContainer(ctrId string)
func (*HostContainerCPU) HasContainer ¶
func (h *HostContainerCPU) HasContainer(ctrId string) bool
func (*HostContainerCPU) InsertContainer ¶
func (h *HostContainerCPU) InsertContainer(ctrId string, ctrIdx int)
type HostContainerCPUMap ¶
type HostContainerCPUMap struct { Map map[string]*HostContainerCPU `json:"map"` // contains filtered or unexported fields }
func NewHostContainerCPUMap ¶
func NewHostContainerCPUMap(topo *hostapi.HostTopology, stateFile string) (*HostContainerCPUMap, error)
func (*HostContainerCPUMap) Delete ¶
func (hm *HostContainerCPUMap) Delete(ctrId string) error
type ListContainerOptions ¶
type ListContainerOptions struct { // Id of container Id string // PodId of container PodId string // Regular expression pattern to match pod or container NameRegexp string // Regular expression pattern to match the pod namespace PodNamespaceRegexp string // State of the sandbox State string // Show verbose info for the sandbox Verbose bool // Labels are selectors for the sandbox Labels map[string]string // Image ued by the container Image string }
type ListPodOptions ¶
type RunContainersResponse ¶
Click to show internal directories.
Click to hide internal directories.