image

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PullTimeout       = 20 * time.Minute
	PullRetryInterval = 5 * time.Second
)

Image pull retry settings.

View Source
const (
	ImportTimeout       = 5 * time.Minute
	ImportRetryInterval = 5 * time.Second
	ImportRetryJitter   = time.Second
)

Image import retry settings.

Variables

This section is empty.

Functions

func Import added in v0.7.0

func Import(ctx context.Context, imagePath, indexName string) error

Import is a convenience function that wraps containerd image import with retries.

func NewResolver added in v0.4.0

func NewResolver(reg config.Registries) remotes.Resolver

NewResolver builds registry resolver based on Talos configuration.

func PrepareAuth added in v0.4.0

func PrepareAuth(auth config.RegistryAuthConfig, host, expectedHost string) (string, string, error)

PrepareAuth returns authentication info in the format expected by containerd.

func Pull

func Pull(ctx context.Context, reg config.Registries, client *containerd.Client, ref string, opt ...PullOption) (img containerd.Image, err error)

Pull is a convenience function that wraps the containerd image pull func with retry functionality.

func RegistryEndpoints added in v0.4.0

func RegistryEndpoints(reg config.Registries, host string) ([]string, error)

RegistryEndpoints returns registry endpoints per host using reg.

func RegistryHosts added in v0.4.0

func RegistryHosts(reg config.Registries) docker.RegistryHosts

RegistryHosts returns host configuration per registry.

Types

type PullOption added in v0.9.0

type PullOption func(*PullOptions)

PullOption is an option for Pull function.

func WithSkipIfAlreadyPulled added in v0.9.0

func WithSkipIfAlreadyPulled() PullOption

WithSkipIfAlreadyPulled skips pulling if image is already pulled and unpacked.

type PullOptions added in v0.9.0

type PullOptions struct {
	SkipIfAlreadyPulled bool
}

PullOptions configure Pull function.

Jump to

Keyboard shortcuts

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