image

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: Apache-2.0 Imports: 22 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

Functions

This section is empty.

Types

type DockerClient added in v0.29.0

type DockerClient interface {
	local.DockerClient
	ImagePull(ctx context.Context, ref string, options image.PullOptions) (io.ReadCloser, error)
}

type FetchOptions

type FetchOptions struct {
	Daemon       bool
	Target       *dist.Target
	PullPolicy   PullPolicy
	LayoutOption LayoutOption
}

type Fetcher

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

func NewFetcher

func NewFetcher(logger logging.Logger, docker DockerClient, opts ...FetcherOption) *Fetcher

func (*Fetcher) CheckReadAccess added in v0.34.0

func (f *Fetcher) CheckReadAccess(repo string, options FetchOptions) bool

func (*Fetcher) Fetch

func (f *Fetcher) Fetch(ctx context.Context, name string, options FetchOptions) (imgutil.Image, error)

type FetcherOption

type FetcherOption func(c *Fetcher)

FetcherOption is a type of function that mutate settings on the client. Values in these functions are set through currying.

func WithKeychain added in v0.25.0

func WithKeychain(keychain authn.Keychain) FetcherOption

func WithRegistryMirrors

func WithRegistryMirrors(registryMirrors map[string]string) FetcherOption

WithRegistryMirrors supply your own mirrors for registry.

type LayoutOption added in v0.29.0

type LayoutOption struct {
	Path   string
	Sparse bool
}

type PullPolicy

type PullPolicy int

PullPolicy defines a policy for how to manage images

const (
	// PullAlways images, even if they are present
	PullAlways PullPolicy = iota
	// PullNever images, even if they are not present
	PullNever
	// PullIfNotPresent pulls images if they aren't present
	PullIfNotPresent
)

func ParsePullPolicy

func ParsePullPolicy(policy string) (PullPolicy, error)

ParsePullPolicy from string

func (PullPolicy) String

func (p PullPolicy) String() string

Jump to

Keyboard shortcuts

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