image

package
v0.28.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2022 License: Apache-2.0 Imports: 18 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 FetchOptions

type FetchOptions struct {
	Daemon     bool
	Platform   string
	PullPolicy PullPolicy
}

type Fetcher

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

func NewFetcher

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

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 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