image

package
v1.2.8-k3s.1 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

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 added in v1.19.0

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 added in v1.19.0

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

Resolve resolves a image reference to image id.

func (*Store) Update added in v1.19.0

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