layout

package
v0.0.0-...-846bdf4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 5 Imported by: 5

Documentation

Index

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 NewBundle

func NewBundle(root string) (*Bundle, error)

func (*Bundle) GetContainerBundle

func (bl *Bundle) GetContainerBundle(containerID string) *ContainerBundle

func (*Bundle) GetRootDirectory

func (bl *Bundle) GetRootDirectory() string

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

func (li *LocalImage) List(filter map[string]string) ([]*kii.ImageName, error)

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL