image

package
v0.33.2 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: Apache-2.0 Imports: 20 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

This section is empty.

Types

type Checker added in v0.33.0

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

func NewAccessChecker added in v0.33.0

func NewAccessChecker(logger logging.Logger, keychain authn.Keychain) *Checker

func (*Checker) Check added in v0.33.0

func (c *Checker) Check(repo string) bool

type DockerClient added in v0.29.0

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

type FetchOptions

type FetchOptions struct {
	Daemon       bool
	Platform     string
	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) 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