image

package
v1.6.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2021 License: Apache-2.0 Imports: 14 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	// Id of the image. Normally the digest of image config.
	ID string
	// References are references to the image, e.g. RepoTag and RepoDigest.
	References []string
	// ChainID is the chainID of the image.
	ChainID string
	// Size is the compressed size of the image.
	Size int64
	// ImageSpec is the oci image structure which describes basic information about the image.
	ImageSpec imagespec.Image
}

Image contains all resources associated with the image. All fields MUST not be mutated directly after created.

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store stores all images.

func NewFakeStore

func NewFakeStore(images []Image) (*Store, error)

NewFakeStore returns an image store with predefined images. Update is not allowed for this fake store.

func NewStore

func NewStore(client *containerd.Client) *Store

NewStore creates an image store.

func (*Store) Get

func (s *Store) Get(id string) (Image, error)

Get gets image metadata by image id. The id can be truncated. Returns various validation errors if the image id is invalid. Returns storeutil.ErrNotExist if the image doesn't exist.

func (*Store) List

func (s *Store) List() []Image

List lists all images.

func (*Store) Resolve

func (s *Store) Resolve(ref string) (string, error)

Resolve resolves a image reference to image id.

func (*Store) Update

func (s *Store) Update(ctx context.Context, ref string) error

Update updates cache for a reference.

Jump to

Keyboard shortcuts

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