Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ContainerdEndpoint1 = filepath.Join(system.Conf.VarRunRootDir, "containerd.sock") ContainerdEndpoint2 = filepath.Join(system.Conf.VarRunRootDir, "containerd/containerd.sock") GrpcDial = grpc.DialContext // for test )
View Source
var (
DockerEndpoint = filepath.Join(system.Conf.VarRunRootDir, "docker.sock")
)
View Source
var GetDockerClient = createDockerClient // for test
Functions ¶
This section is empty.
Types ¶
type ContainerRuntimeHandler ¶
type ContainerRuntimeHandler interface { StopContainer(containerID string, timeout int64) error UpdateContainerResources(containerID string, opts UpdateOptions) error }
func NewContainerdRuntimeHandler ¶
func NewContainerdRuntimeHandler(endpoint string) (ContainerRuntimeHandler, error)
func NewDockerRuntimeHandler ¶
func NewDockerRuntimeHandler(endpoint string) (ContainerRuntimeHandler, error)
func NewFakeRuntimeHandler ¶
func NewFakeRuntimeHandler() ContainerRuntimeHandler
type ContainerdRuntimeHandler ¶
type ContainerdRuntimeHandler struct {
// contains filtered or unexported fields
}
func (*ContainerdRuntimeHandler) StopContainer ¶
func (c *ContainerdRuntimeHandler) StopContainer(containerID string, timeout int64) error
func (*ContainerdRuntimeHandler) UpdateContainerResources ¶
func (c *ContainerdRuntimeHandler) UpdateContainerResources(containerID string, opts UpdateOptions) error
type DockerRuntimeHandler ¶
type DockerRuntimeHandler struct {
// contains filtered or unexported fields
}
func (*DockerRuntimeHandler) StopContainer ¶
func (d *DockerRuntimeHandler) StopContainer(containerID string, timeout int64) error
func (*DockerRuntimeHandler) UpdateContainerResources ¶
func (d *DockerRuntimeHandler) UpdateContainerResources(containerID string, opts UpdateOptions) error
type FakeRuntimeHandler ¶
type FakeRuntimeHandler struct { PodMetas map[string]*statesinformer.PodMeta // contains filtered or unexported fields }
func (*FakeRuntimeHandler) SetFakeContainers ¶
func (f *FakeRuntimeHandler) SetFakeContainers(containers []*testing.FakeContainer)
func (*FakeRuntimeHandler) StopContainer ¶
func (f *FakeRuntimeHandler) StopContainer(containerID string, timeout int64) error
func (*FakeRuntimeHandler) UpdateContainerResources ¶
func (f *FakeRuntimeHandler) UpdateContainerResources(containerID string, opts UpdateOptions) error
type UpdateOptions ¶
type UpdateOptions struct { // CPU CFS (Completely Fair Scheduler) period. Default: 0 (not specified). CPUPeriod int64 // CPU CFS (Completely Fair Scheduler) quota. Default: 0 (not specified). CPUQuota int64 CPUShares int64 // Memory limit in bytes. Default: 0 (not specified). MemoryLimitInBytes int64 // OOMScoreAdj adjusts the oom-killer score. Default: 0 (not specified). OomScoreAdj int64 // CpuSetCpus constrains the allowed set of logical CPUs. Default: "" (not specified). CpusetCpus string // CpuSetMems constrains the allowed set of memory nodes. Default: "" (not specified). CpusetMems string // SpecAnnotationFilePath is the file path to specAnnotations. In JSON|Yaml format. SpecAnnotationFilePath string }
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
Package mock_client is a generated GoMock package.
|
Package mock_client is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.