Documentation ¶
Index ¶
- Constants
- func DelImageByName(names []string) error
- func Exce(name string, cmdArr []string, tty bool) error
- func ExportCommitContainer(name string, imgetar string) error
- func GetConfigSavePath() string
- func GetInfoByContainerName(containerName string, data *ContainerInfos) error
- func GetLogByContainerName(containerName string) (string, error)
- func LoadImage(image string) error
- func NewWorkSpace(baseImgName string, containerName string, volumeArg []string) (*workSpace, error)
- func RestartContainer(name string) error
- func Rm(name string, force bool) error
- func RunContainer(args *RunCommandArgs) error
- func RunContainerProgram() error
- func StartContainerByName(name string) error
- func StopContainerByName(name string) error
- func WirteImagesInfoToTabwriter(w *tabwriter.Writer) error
- type ContainerInfos
- func (t *ContainerInfos) DeleteContainerInfo()
- func (t *ContainerInfos) RecordContainerInfo() error
- func (t *ContainerInfos) SetCg(cg *cgroups.CgroupManager)
- func (t *ContainerInfos) SetContainerName(containerName string)
- func (t *ContainerInfos) SetNetInfo(ep *network.Endpoint)
- func (t *ContainerInfos) SetWorkSpace(ws *workSpace)
- func (t *ContainerInfos) UpdatePid(pid int)
- func (t *ContainerInfos) WirteInfoToTabwriter(w *tabwriter.Writer)
- type RunCommandArgs
Constants ¶
View Source
const ( Running string = "running" Stop string = "stopped" Exit string = "exited" )
Variables ¶
This section is empty.
Functions ¶
func DelImageByName ¶
func ExportCommitContainer ¶
func GetConfigSavePath ¶
func GetConfigSavePath() string
func GetInfoByContainerName ¶
func GetInfoByContainerName(containerName string, data *ContainerInfos) error
func GetLogByContainerName ¶
func NewWorkSpace ¶
初始化工作区 并挂载overlay root 镜像的根目录 baseImg 镜像名称 mnt overlay挂载点
func RestartContainer ¶
func RunContainer ¶
func RunContainer(args *RunCommandArgs) error
func RunContainerProgram ¶
func RunContainerProgram() error
func StartContainerByName ¶
func StopContainerByName ¶
Types ¶
type ContainerInfos ¶
type ContainerInfos struct { Id string `json:"id"` //容器id Pid string `json:"pid"` //容器init进程在宿主机上的pid Name string `json:"name"` //容器名称 Command string `json:"command"` //容器init进程执行的命令 CreateTime string `json:"createTime"` //容器创建时间 Status string `json:"status"` //容器状态 Volume []string `json:"volume"` PortMapping []string `json:"portMapping"` IpInfo network.Endpoint `json:"ipInfo"` Env []string `json:"env"` Cg cgroups.CgroupManager `json:"cg"` WorkSpace workSpace `json:"wrokSpace"` }
func (*ContainerInfos) DeleteContainerInfo ¶
func (t *ContainerInfos) DeleteContainerInfo()
func (*ContainerInfos) RecordContainerInfo ¶
func (t *ContainerInfos) RecordContainerInfo() error
func (*ContainerInfos) SetCg ¶
func (t *ContainerInfos) SetCg(cg *cgroups.CgroupManager)
func (*ContainerInfos) SetContainerName ¶
func (t *ContainerInfos) SetContainerName(containerName string)
func (*ContainerInfos) SetNetInfo ¶
func (t *ContainerInfos) SetNetInfo(ep *network.Endpoint)
func (*ContainerInfos) SetWorkSpace ¶
func (t *ContainerInfos) SetWorkSpace(ws *workSpace)
func (*ContainerInfos) UpdatePid ¶
func (t *ContainerInfos) UpdatePid(pid int)
func (*ContainerInfos) WirteInfoToTabwriter ¶
func (t *ContainerInfos) WirteInfoToTabwriter(w *tabwriter.Writer)
Click to show internal directories.
Click to hide internal directories.