Documentation ¶
Index ¶
- Constants
- type ImageManager
- func (im *ImageManager) CleanupImageCopy(imageName, sandboxID string) error
- func (im *ImageManager) GetFsUsage(imageID string) ([]*kubeapi.FilesystemUsage, error)
- func (im *ImageManager) GetImageInfo(imageName string) (*metaimage.Image, error)
- func (im *ImageManager) ListImages() []metaimage.Image
- func (im *ImageManager) PrepareImage(imageName, sandboxID string) (s *metaimage.Storage, err error)
- func (im *ImageManager) PullImage(imageName string) (imageRef string, err error)
- func (im *ImageManager) RemoveImage(imageName string) error
- type ImageManifest
Constants ¶
View Source
const ( // UnikernelImagePrefix is the prefix of unikernel runtime image name. UnikernelImagePrefix = "unikernel/" // DefaultImageSuffix is the default image tag kubelet try to add to image. DefaultImageSuffix = ":latest" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ImageManager ¶
type ImageManager struct {
// contains filtered or unexported fields
}
func NewImageManager ¶
func NewImageManager(downloadProtocol, unikernelRoot string) (*ImageManager, error)
func (*ImageManager) CleanupImageCopy ¶
func (im *ImageManager) CleanupImageCopy(imageName, sandboxID string) error
CleanupImageCopy cleanups image copy or other files prepared for container when create container.
func (*ImageManager) GetFsUsage ¶
func (im *ImageManager) GetFsUsage(imageID string) ([]*kubeapi.FilesystemUsage, error)
GetFsUsage get image filesystem usage, including all copies of this image. TODO(Crazykev): Implement it. FIXME(Crazykev): Need to figure out is one image should only have one FilesystemUsage?
func (*ImageManager) GetImageInfo ¶
func (im *ImageManager) GetImageInfo(imageName string) (*metaimage.Image, error)
GetImageInfo gets image metadata for image ID
func (*ImageManager) ListImages ¶
func (im *ImageManager) ListImages() []metaimage.Image
ListImages lists all images stores in ImageManager
func (*ImageManager) PrepareImage ¶
func (im *ImageManager) PrepareImage(imageName, sandboxID string) (s *metaimage.Storage, err error)
PrepareImage prepares image for container or VM and returns a location descriptor for image.
func (*ImageManager) PullImage ¶
func (im *ImageManager) PullImage(imageName string) (imageRef string, err error)
PullImage download image from internet
func (*ImageManager) RemoveImage ¶
func (im *ImageManager) RemoveImage(imageName string) error
RemoveImage removes image by imageName If image is referenced by other containers, returns error
Click to show internal directories.
Click to hide internal directories.