Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ReservedImages = []string{
"drone/drone:*",
"drone/agent:*",
"drone/gc:*",
"drone/autoscaler:*",
}
ReservedImages provides a list of reserved images names that should not be removed.
var ReservedNames = []string{
"drone",
"drone-server",
"agent",
"drone-agent",
"gc",
"drone-gc",
"autoscaler",
"autoscale",
"watchtower",
"cadvisor",
}
ReservedNames provides a list of reserved container names that should not be removed.
Functions ¶
Types ¶
type FilterFunc ¶
FilterFunc filters the Docker resource based on its labels. If the function returns false, the resource is ignored.
type Option ¶
type Option func(*collector)
Option configures a garbage collector option.
func WithImageWhitelist ¶
WithImageWhitelist returns an option to set an image whitelist. This will prevent the garbage collector from removing named containers.
func WithThreshold ¶
WithThreshold returns an option to set a threshold for the image cache. The cache will clear images until the layer size is below the target threshold.
func WithWhitelist ¶
WithWhitelist returns an option to set a whitelist of container names. This will prevent the garbage collector from removing matching containers.