Documentation ¶
Index ¶
- Constants
- Variables
- func GetContainerdEndpoint() string
- func GetContainerdEndpoint2() string
- func GetCrioEndpoint() string
- func GetCrioEndpoint2() string
- func GetDockerEndpoint() string
- func GetPouchEndpoint() string
- type ContainerRuntimeHandler
- func NewContainerdRuntimeHandler(endpoint string) (ContainerRuntimeHandler, error)
- func NewCrioRuntimeHandler(endpoint string) (ContainerRuntimeHandler, error)
- func NewDockerRuntimeHandler(endpoint string) (ContainerRuntimeHandler, error)
- func NewFakeRuntimeHandler() ContainerRuntimeHandler
- func NewPouchRuntimeHandler(endpoint string) (ContainerRuntimeHandler, error)
- type ContainerdRuntimeHandler
- type CrioRuntimeHandler
- type DockerRuntimeHandler
- type FakeRuntimeHandler
- type PouchRuntimeHandler
- type UpdateOptions
Constants ¶
View Source
const (
PouchEndpointSubFilepath = "pouchcri.sock"
)
Variables ¶
View Source
var GetDockerClient = createDockerClient // for test
View Source
var (
GrpcDial = grpc.DialContext // for test
)
Functions ¶
func GetContainerdEndpoint ¶ added in v1.3.0
func GetContainerdEndpoint() string
func GetContainerdEndpoint2 ¶ added in v1.3.0
func GetContainerdEndpoint2() string
func GetCrioEndpoint ¶ added in v1.5.0
func GetCrioEndpoint() string
func GetCrioEndpoint2 ¶ added in v1.5.0
func GetCrioEndpoint2() string
func GetDockerEndpoint ¶ added in v1.3.0
func GetDockerEndpoint() string
func GetPouchEndpoint ¶ added in v1.4.0
func GetPouchEndpoint() string
Types ¶
type ContainerRuntimeHandler ¶
type ContainerRuntimeHandler interface { StopContainer(ctx context.Context, containerID string, timeout int64) error UpdateContainerResources(containerID string, opts UpdateOptions) error }
func NewContainerdRuntimeHandler ¶
func NewContainerdRuntimeHandler(endpoint string) (ContainerRuntimeHandler, error)
func NewCrioRuntimeHandler ¶ added in v1.5.0
func NewCrioRuntimeHandler(endpoint string) (ContainerRuntimeHandler, error)
func NewDockerRuntimeHandler ¶
func NewDockerRuntimeHandler(endpoint string) (ContainerRuntimeHandler, error)
func NewFakeRuntimeHandler ¶
func NewFakeRuntimeHandler() ContainerRuntimeHandler
func NewPouchRuntimeHandler ¶ added in v1.4.0
func NewPouchRuntimeHandler(endpoint string) (ContainerRuntimeHandler, error)
type ContainerdRuntimeHandler ¶
type ContainerdRuntimeHandler struct {
// contains filtered or unexported fields
}
func (*ContainerdRuntimeHandler) StopContainer ¶
func (*ContainerdRuntimeHandler) UpdateContainerResources ¶
func (c *ContainerdRuntimeHandler) UpdateContainerResources(containerID string, opts UpdateOptions) error
type CrioRuntimeHandler ¶ added in v1.5.0
type CrioRuntimeHandler struct {
// contains filtered or unexported fields
}
func (*CrioRuntimeHandler) StopContainer ¶ added in v1.5.0
func (*CrioRuntimeHandler) UpdateContainerResources ¶ added in v1.5.0
func (c *CrioRuntimeHandler) UpdateContainerResources(containerID string, opts UpdateOptions) error
type DockerRuntimeHandler ¶
type DockerRuntimeHandler struct {
// contains filtered or unexported fields
}
func (*DockerRuntimeHandler) StopContainer ¶
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 (*FakeRuntimeHandler) UpdateContainerResources ¶
func (f *FakeRuntimeHandler) UpdateContainerResources(containerID string, opts UpdateOptions) error
type PouchRuntimeHandler ¶ added in v1.4.0
type PouchRuntimeHandler struct {
// contains filtered or unexported fields
}
func (*PouchRuntimeHandler) StopContainer ¶ added in v1.4.0
func (*PouchRuntimeHandler) UpdateContainerResources ¶ added in v1.4.0
func (c *PouchRuntimeHandler) 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.