Documentation ¶
Index ¶
- type Bundle
- type ContainerBundle
- type LocalImage
- func (li *LocalImage) GetConfigFilePath(image *kii.ImageName) string
- func (li *LocalImage) GetLayerDir(layerHash string) string
- func (li *LocalImage) GetLayerTarFile(layerHash string) string
- func (li *LocalImage) GetLayerUnpackDir(layerHash string) string
- func (li *LocalImage) GetManifestFilePath(image *kii.ImageName) string
- func (li *LocalImage) GetManifestsDir(image *kii.ImageName) string
- func (li *LocalImage) GetRepositoriesEntry() string
- func (li *LocalImage) GetTemporaryDir(pattern string) (string, error)
- func (li *LocalImage) GetTemporaryFile(pattern string) (*os.File, error)
- func (li *LocalImage) List(filter map[string]string) ([]*kii.ImageName, error)
- func (li *LocalImage) ListLayers() ([]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bundle ¶
type Bundle struct {
// contains filtered or unexported fields
}
func (*Bundle) GetContainerBundle ¶
func (bl *Bundle) GetContainerBundle(containerID string) *ContainerBundle
func (*Bundle) GetRootDirectory ¶
GetRootDirectory returns the root directory of the bundle. For example, if we have a directory structure like this:
root <--- return by GetRootDirectory └── ${container_id} <--- return by ContainerBundle's root
├── working <--- return by GetFsWorkingDirPath, subdirectory managed by FS itself │ ├── .meta │ ├── upperDir │ └── workDir ├── config.json <--- return by GetOciConfigPath └── rootfs <--- return by GetOciRootfsPath
type ContainerBundle ¶
type ContainerBundle struct {
// contains filtered or unexported fields
}
func (*ContainerBundle) GetFsWorkingDirPath ¶
func (cb *ContainerBundle) GetFsWorkingDirPath() string
func (*ContainerBundle) GetOciConfigPath ¶
func (cb *ContainerBundle) GetOciConfigPath() string
func (*ContainerBundle) GetOciRootfsName ¶
func (cb *ContainerBundle) GetOciRootfsName() string
func (*ContainerBundle) GetOciRootfsPath ¶
func (cb *ContainerBundle) GetOciRootfsPath() string
func (*ContainerBundle) GetRootDirectory ¶
func (cb *ContainerBundle) GetRootDirectory() string
type LocalImage ¶
type LocalImage struct {
// contains filtered or unexported fields
}
func NewLocalImage ¶
func NewLocalImage(rootDir string) (*LocalImage, error)
func (*LocalImage) GetConfigFilePath ¶
func (li *LocalImage) GetConfigFilePath(image *kii.ImageName) string
func (*LocalImage) GetLayerDir ¶
func (li *LocalImage) GetLayerDir(layerHash string) string
func (*LocalImage) GetLayerTarFile ¶
func (li *LocalImage) GetLayerTarFile(layerHash string) string
func (*LocalImage) GetLayerUnpackDir ¶
func (li *LocalImage) GetLayerUnpackDir(layerHash string) string
func (*LocalImage) GetManifestFilePath ¶
func (li *LocalImage) GetManifestFilePath(image *kii.ImageName) string
func (*LocalImage) GetManifestsDir ¶
func (li *LocalImage) GetManifestsDir(image *kii.ImageName) string
func (*LocalImage) GetRepositoriesEntry ¶
func (li *LocalImage) GetRepositoriesEntry() string
func (*LocalImage) GetTemporaryDir ¶
func (li *LocalImage) GetTemporaryDir(pattern string) (string, error)
GetTemporaryDir It is the caller's responsibility to remove the directory when no longer needed.
func (*LocalImage) GetTemporaryFile ¶
func (li *LocalImage) GetTemporaryFile(pattern string) (*os.File, error)
GetTemporaryFile Multiple programs calling GetTemporaryFile simultaneously will not choose the same file. The caller can use f.Name() to find the pathname of the file. It is the caller's responsibility to remove the file when no longer needed.
func (*LocalImage) List ¶
List When some images list success and some fail, the return value "ImageName" and "error" can have values at the same time, and "error" variable stores the last failed message. If all images list fail, "ImageName" is an empty slice and will never be nil
func (*LocalImage) ListLayers ¶
func (li *LocalImage) ListLayers() ([]string, error)