image

package
v1.19.3 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2021 License: Apache-2.0 Imports: 8 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockImage

type MockImage struct {
	Labels map[string]string
	FS     fs.FS
}

type MockRegistry

type MockRegistry struct {
	RemoteImages map[Reference]*MockImage
	// contains filtered or unexported fields
}

func (*MockRegistry) Destroy

func (m *MockRegistry) Destroy() error

func (*MockRegistry) Labels

func (m *MockRegistry) Labels(_ context.Context, ref Reference) (map[string]string, error)

func (*MockRegistry) Pull

func (m *MockRegistry) Pull(_ context.Context, ref Reference) error

func (*MockRegistry) Unpack

func (m *MockRegistry) Unpack(_ context.Context, ref Reference, dir string) error

type Reference

type Reference interface {
	fmt.Stringer
}

Reference describes a reference to a container image.

type Registry

type Registry interface {
	// Pull fetches and stores an image by reference.
	Pull(ctx context.Context, ref Reference) error

	// Unpack writes the unpackaged content of an image to a directory.
	// If the referenced image does not exist in the registry, an error is returned.
	Unpack(ctx context.Context, ref Reference, dir string) error

	// Labels gets the labels for an image that is already stored.
	Labels(ctx context.Context, ref Reference) (map[string]string, error)

	// Destroy cleans up any on-disk resources used to track images
	Destroy() error
}

Registry knows how to Pull and Unpack Operator Bundle images to the filesystem. Note: In the future, Registry will know how to Build and Push Operator Bundle images as well.

type SimpleReference

type SimpleReference string

SimpleReference is a reference backed by a string with no additional validation.

func (SimpleReference) String

func (s SimpleReference) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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