Documentation ¶
Index ¶
Constants ¶
View Source
const ( // StopTimeEnd 时间到 StopByTimeEnd StopType = "time" // StopByInterrupt 手动停止 StopByInterrupt StopType = "interrupt" // TaskCleanNoneImage 删除none镜像 TaskCleanNoneImage TaskType = "none" // TaskCleanPeriodImage 删除存在某一段时间的镜像 TaskCleanPeriodImage TaskType = "period" // StatusNotActived 任务未激活状态 StatusNotActived Status = "NotActived" // StatusInActived 任务已激活 StatusInActived Status = "InActived" // StatusCompleted 任务已完成 StatusCompleted Status = "Completed" )
View Source
const (
// DockerUnixSock socket file for communicate with docker daemon
DockerUnixSock = "/var/run/docker.sock"
)
View Source
const Format = "3:04:05"
Variables ¶
This section is empty.
Functions ¶
func CheckFileExist ¶
CheckFileExist returns whether the given file or directory exists or not
Types ¶
type NoneImageJob ¶
type NoneImageJob struct { Status Status StartTime string StopTime string // contains filtered or unexported fields }
NoneImageJob clean none image job
type Schedule ¶
type Schedule struct { DockerHost string ExcludeImages []string Tasks map[TaskType]Job // contains filtered or unexported fields }
Schedule for clean docker
type Task ¶
type Task struct { StartTime *time.Time StopTime *time.Time TaskType TaskType Status Status StopSignal chan struct{} // contains filtered or unexported fields }
Task 具体任务
func (*Task) NoneImage ¶
NoneImage remove none tag image force force remove when running container with
func (*Task) PeriodImage ¶
PeriodImage 删除存在某一段时间的镜像
Click to show internal directories.
Click to hide internal directories.