Documentation ¶
Index ¶
- Constants
- Variables
- func CleanUpWorkspace(containerID string) error
- func CreateMountPoint(rootURL, writeLayerURL, mntURL, containerID string)
- func CreateMountVolumePoint(mntURL string, volumeURLs []string)
- func CreateReadOnlyLayer(rootURL string)
- func CreateWriteLayer(writeLayerURL string)
- func DeleteContainerInfo(containerID string)
- func DeleteMountPoint(mntURL string)
- func DeleteWorkSpace(writeLayerURL, mntURL string, volumeURLs []string)
- func DeleteWriteLayer(writeLayerURL string)
- func GenerateUUID() string
- func GetContainerPidByID(containerId string) (string, error)
- func GetContainerPidByIdentification(containerNameOrID string) (string, error)
- func GetContainerPidByName(containerName string) (string, error)
- func ListContainer(all bool)
- func NewWorkSpace(containerID string, volumeURLs []string)
- func RecordContainerInfo(containerPID int, containerID, containerName string, cmdArgs []string) (string, error)
- func UnmountVolume(volumeMntURL string)
- type Info
Constants ¶
View Source
const ( Running = "RUNNING" Stop = "STOPPED" Exit = "EXITED" )
View Source
const ( RootURL = "/root/" WriteLayerURL = "/var/lib/mydocker/%s/writeLayer" MntURL = "/run/mydocker/%s/mnt" )
Variables ¶
View Source
var ( DefaultInfoLocation = "/var/lib/mydocker/infos" ConfigName = "config.json" )
Functions ¶
func CleanUpWorkspace ¶
func CreateMountPoint ¶
func CreateMountPoint(rootURL, writeLayerURL, mntURL, containerID string)
func CreateMountVolumePoint ¶
func CreateReadOnlyLayer ¶
func CreateReadOnlyLayer(rootURL string)
func CreateWriteLayer ¶
func CreateWriteLayer(writeLayerURL string)
func DeleteContainerInfo ¶
func DeleteContainerInfo(containerID string)
func DeleteMountPoint ¶
func DeleteMountPoint(mntURL string)
func DeleteWorkSpace ¶
DeleteWorkSpace delete container workspace
func DeleteWriteLayer ¶
func DeleteWriteLayer(writeLayerURL string)
func GetContainerPidByID ¶
func GetContainerPidByName ¶
func ListContainer ¶
func ListContainer(all bool)
func NewWorkSpace ¶
NewWorkSpace create container workspace
func RecordContainerInfo ¶
func RecordContainerInfo(containerPID int, containerID, containerName string, cmdArgs []string) (string, error)
RecordContainerInfo record container info
func UnmountVolume ¶
func UnmountVolume(volumeMntURL string)
Types ¶
type Info ¶
type Info struct { Pid string `json:"pid"` ID string `json:"id"` Name string `json:"name"` Command string `json:"command"` CreatedAt string `json:"created_at"` Status string `json:"status"` Rm bool `json:"remove"` Tty bool `json:"tty"` Volumes []string `json:"volumes"` Resource string `json:"resource"` Envs []string `json:"envs"` }
container info
func GetContainerInfoByName ¶
Click to show internal directories.
Click to hide internal directories.