Documentation
¶
Index ¶
- Constants
- Variables
- func DeleteImage(ctx *fiber.Ctx) error
- func DeleteRegistryMirror(ctx *fiber.Ctx) error
- func EnsureRegistryMirror(ctx context.Context, registry string, endpoint string) (bool, error)
- func GetRegistryMirrors(ctx *fiber.Ctx) (map[string]Mirror, error)
- func ListImages(ctx *fiber.Ctx, registry string) ([]*criruntimev1.Image, error)
- func NewCRIImageService() (criapi.ImageManagerService, error)
- func NewCRIRuntimeService() (criapi.RuntimeService, error)
- func NewClient() (*containerd.Client, error)
- type Mirror
- type PruneImageResult
- type Registry
Constants ¶
View Source
const ( DefaultContainerdConfigPath = "/etc/containerd/config.toml" DefaultContainerdRootPath = "/var/lib/containerd" )
View Source
const (
DefaultNamespace = "k8s.io"
)
Variables ¶
View Source
var ( ParamRegistryName = "registry" DefaultRegistryName = "docker.io" ParamImageName = "image" )
Functions ¶
func DeleteImage ¶
func DeleteRegistryMirror ¶
func EnsureRegistryMirror ¶
EnsureRegistryMirror ensures the given endpoint is the first entry for the registry mirror. Returns updated=true if configuration changed and was persisted (containerd restarted), or updated=false if it was already first. Returns error on failure.
func ListImages ¶
func NewCRIImageService ¶
func NewCRIImageService() (criapi.ImageManagerService, error)
func NewCRIRuntimeService ¶
func NewCRIRuntimeService() (criapi.RuntimeService, error)
func NewClient ¶
func NewClient() (*containerd.Client, error)
Types ¶
type PruneImageResult ¶
type PruneImageResult struct {
Images []*criruntimev1.Image `json:"images"`
Count int `json:"count"`
Size uint64 `json:"size"`
}
func PruneImages ¶
func PruneImages(ctx *fiber.Ctx) (*PruneImageResult, error)
Click to show internal directories.
Click to hide internal directories.