Documentation ¶
Index ¶
- Constants
- func Import(ctx context.Context, imagePath, indexName string) error
- func NewResolver(reg config.Registries) remotes.Resolver
- func PrepareAuth(auth config.RegistryAuthConfig, host, expectedHost string) (string, string, error)
- func Pull(ctx context.Context, reg config.Registries, client *containerd.Client, ...) (img containerd.Image, err error)
- func RegistryEndpoints(reg config.Registries, host string) (endpoints []string, overridePath bool, err error)
- func RegistryHosts(reg config.Registries) docker.RegistryHosts
- type PullOption
- type PullOptions
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 NewResolver ¶
func NewResolver(reg config.Registries) remotes.Resolver
NewResolver builds registry resolver based on Talos configuration.
func PrepareAuth ¶
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 ¶
func RegistryEndpoints(reg config.Registries, host string) (endpoints []string, overridePath bool, err error)
RegistryEndpoints returns registry endpoints per host using reg.
func RegistryHosts ¶
func RegistryHosts(reg config.Registries) docker.RegistryHosts
RegistryHosts returns host configuration per registry.
Types ¶
type PullOption ¶
type PullOption func(*PullOptions)
PullOption is an option for Pull function.
func WithSkipIfAlreadyPulled ¶
func WithSkipIfAlreadyPulled() PullOption
WithSkipIfAlreadyPulled skips pulling if image is already pulled and unpacked.
type PullOptions ¶
type PullOptions struct {
SkipIfAlreadyPulled bool
}
PullOptions configure Pull function.
Click to show internal directories.
Click to hide internal directories.