Versions in this module Expand all Collapse all v1 v1.19.1 Oct 25, 2022 Changes in this version + const ContainerStatus_CREATED + const ContainerStatus_DEAD + const ContainerStatus_EXITED + const ContainerStatus_PAUSED + const ContainerStatus_RESTARTING + const ContainerStatus_RUNNING + const DefaultDockerCPUPeriod + const StopContainerGraceTime + func EnvOperCopy(task *BcsContainerTask) + type BcsContainerInfo struct + BcsMessage *schedTypes.BcsMessage + ConsecutiveFailureTimes int + ExitCode int + FinishAt time.Time + Healthy bool + Hostname string + ID string + IPAddress string + IsChecked bool + Message string + Name string + NetworkMode string + NodeAddress string + OOMKilled bool + Pid int + Ports []BcsPort + Resource *schedTypes.Resource + StartAt time.Time + Status string + func (info *BcsContainerInfo) Update(other *BcsContainerInfo) + type BcsContainerTask struct + Args []string + AutoRemove bool + BcsMessages []*bcstypes.BcsMessage + Command string + Env []BcsKV + ExtendedResources []*comtypes.ExtendedResource + ForcePullImage bool + HealthCheck healthcheck.Checker + HostName string + Hosts []string + Image string + Ipc string + KillPolicy int + Labels []BcsKV + LimitResource *bcstypes.Resource + Name string + NetLimit *comtypes.NetLimit + NetworkIPAddr string + NetworkName string + OOMKillDisabled bool + PortBindings map[string]BcsPort + Privileged bool + PublishAllPorts bool + Resource *bcstypes.Resource + RuntimeConf *BcsContainerInfo + ShmSize int64 + TaskId string + Ulimits []BcsKV + Volums []BcsVolume + type BcsImage struct + Created int64 + ID string + Repository []string + Size int64 + type BcsKV struct + Key string + Value string + type BcsPort struct + ContainerPort string + HostIP string + HostPort string + Name string + Protocol string + type BcsVolume struct + ContainerPath string + HostPath string + ReadOnly bool + type ConEventCB func(*BcsContainerTask) error + type Container interface + CommitImage func(string, string) error + CreateContainer func(containerName string, containerTask *BcsContainerTask) (*BcsContainerInfo, error) + InspectContainer func(containerName string) (*BcsContainerInfo, error) + KillContainer func(containerName string, signal int) error + ListContainer func() + ListImage func(filter string) ([]*BcsImage, error) + PullImage func(image string) error + RemoveContainer func(containerName string, force bool) error + RunCommand func(containerID string, command []string) error + RunCommandV2 func(ops *schedTypes.RequestCommandTask) (*schedTypes.ResponseCommandTask, error) + StartContainer func(containerID string) error + StopContainer func(containerName string, timeout int) error + UpdateResources func(string, *schedTypes.Resource) error + UploadToContainer func(containerID string, source, dest string) error + func NewDockerContainer(endpoint, user, passwd string) Container + type DockerContainer struct + func (docker *DockerContainer) CommitImage(id, image string) error + func (docker *DockerContainer) CreateContainer(containerName string, containerTask *BcsContainerTask) (*BcsContainerInfo, error) + func (docker *DockerContainer) InspectContainer(containerName string) (*BcsContainerInfo, error) + func (docker *DockerContainer) KillContainer(containerName string, signal int) error + func (docker *DockerContainer) ListContainer() + func (docker *DockerContainer) ListImage(filter string) ([]*BcsImage, error) + func (docker *DockerContainer) PullImage(image string) error + func (docker *DockerContainer) RemoveContainer(containerName string, force bool) error + func (docker *DockerContainer) RunCommand(containerID string, command []string) error + func (docker *DockerContainer) RunCommandV2(ops *schedTypes.RequestCommandTask) (*schedTypes.ResponseCommandTask, error) + func (docker *DockerContainer) StartContainer(containerID string) error + func (docker *DockerContainer) StopContainer(containerName string, timeout int) error + func (docker *DockerContainer) UpdateResources(id string, resource *schedTypes.Resource) error + func (docker *DockerContainer) UploadToContainer(containerID string, source, dest string) error + type Pod interface + CommitImage func(string, string) error + Execute func(name string, command []string) error + Finit func() error + GetContainerByName func(name string) *BcsContainerInfo + GetContainerID func() string + GetContainerTasks func() map[string]*BcsContainerTask + GetContainers func() []*BcsContainerInfo + GetIPAddr func() string + GetMessage func() string + GetNamespace func() string + GetNetArgs func() [][2]string + GetNetStatus func() string + GetNetns func() string + GetNetworkName func() string + GetPid func() int + GetPodID func() string + GetPodStatus func() PodStatus + Init func() error + Injection func() bool + IsHealthy func() bool + SetIPAddr func(ip string) + SetPodID func(ID string) + Start func() error + Stop func(graceExit int) + UpdateResources func(string, *schedTypes.Resource) error + UploadFile func(name, source, dest string) error + type PodEventCB func(Pod) error + type PodEventHandler struct + PostStart ConEventCB + PostStop ConEventCB + PreStart ConEventCB + PreStop ConEventCB + type PodStatus string + const PodStatus_FAILED + const PodStatus_FINISH + const PodStatus_INIT + const PodStatus_KILLED + const PodStatus_KILLING + const PodStatus_RUNNING + const PodStatus_STARTING + const PodStatus_UNKNOWN