Documentation
¶
Index ¶
- Variables
- func GC(cacheDir string) (int, error)
- func RemoveRegistryCache(tag string, cacheDir string) error
- func SaveRegistryCache(tag string, cacheDir string, layers []LayerRef, meta ImageMeta) error
- type BuildOptions
- type BuildResult
- type Builder
- type ImageInfo
- type ImageMeta
- type LayerRef
- type OCIConfig
- type Store
- func (s *Store) BlobPath(digest string) string
- func (s *Store) BlobPathWithFS(digest, fsType string) string
- func (s *Store) CacheRoot() string
- func (s *Store) GC() (int, error)
- func (s *Store) Get(tag string) (*BuildResult, error)
- func (s *Store) List() ([]ImageInfo, error)
- func (s *Store) Remove(tag string) error
- func (s *Store) Save(tag string, layers []LayerRef, meta ImageMeta) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrParseReference = errors.New("parse image reference") ErrPullImage = errors.New("pull image") ErrImageDigest = errors.New("get image digest") ErrCreateDir = errors.New("create directory") ErrCreateTemp = errors.New("create temp") ErrExtract = errors.New("extract image") ErrCreateExt4 = errors.New("create ext4") ErrToolNotFound = errors.New("tool not found") ErrTarball = errors.New("tarball") ErrStoreSave = errors.New("save to store") ErrStoreRead = errors.New("read from store") ErrMetadata = errors.New("metadata") ErrImageNotFound = errors.New("image not found") ErrLayerFS = errors.New("invalid layer filesystem type") )
Functions ¶
func RemoveRegistryCache ¶ added in v0.1.9
RemoveRegistryCache removes a registry-cached image by tag.
Types ¶
type BuildOptions ¶
type BuildResult ¶
type BuildResult struct {
// RootfsPath is retained as a convenience alias to the first lower layer path.
RootfsPath string
// LowerPaths are ordered from OCI base layer -> top layer.
LowerPaths []string
LowerFSTypes []string
Layers []LayerRef
// CanonicalLayers are the per-OCI-layer blobs used for dedupe and GC.
CanonicalLayers []LayerRef
Digest string
LayerDigests []string
Size int64
Cached bool
OCI *OCIConfig
}
func GetRegistryCache ¶ added in v0.1.19
func GetRegistryCache(tag string, cacheDir string) (*BuildResult, error)
GetRegistryCache returns a registry-cached image metadata entry as a BuildResult.
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func NewBuilder ¶
func NewBuilder(opts *BuildOptions) *Builder
type ImageInfo ¶ added in v0.1.4
func ListRegistryCache ¶ added in v0.1.4
ListRegistryCache lists images cached from registry pulls (non-local store).
type ImageMeta ¶ added in v0.1.4
type ImageMeta struct {
Tag string `json:"tag"`
Digest string `json:"digest,omitempty"`
Size int64 `json:"size"`
CreatedAt time.Time `json:"created_at"`
Source string `json:"source,omitempty"`
OCI *OCIConfig `json:"oci,omitempty"`
// RuntimeRootfsPath optionally pins the preferred runtime lower blob (hot squash cache).
RuntimeRootfsPath string `json:"-"`
}
type Store ¶ added in v0.1.4
type Store struct {
// contains filtered or unexported fields
}
func (*Store) BlobPathWithFS ¶ added in v0.1.23
Click to show internal directories.
Click to hide internal directories.