resolver

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 37 Imported by: 327

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultPool = NewPool()

DefaultPool is the default shared resolver pool instance

Functions

func NewRegistryConfig added in v0.7.0

func NewRegistryConfig(m map[string]config.RegistryConfig) docker.RegistryHosts

NewRegistryConfig converts registry config to docker.RegistryHosts callback

Types

type Pool added in v0.8.0

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

Pool is a cache of recently used resolvers

func NewPool added in v0.8.0

func NewPool() *Pool

NewPool creates a new pool for caching resolvers

func (*Pool) Clear added in v0.8.0

func (p *Pool) Clear()

Clear deletes currently cached items. This may be called on config changes for example.

func (*Pool) GetResolver added in v0.8.0

func (p *Pool) GetResolver(hosts docker.RegistryHosts, ref, scope string, sm *session.Manager, g session.Group) *Resolver

GetResolver gets a resolver for a specified scope from the pool

type ResolveMode added in v0.13.0

type ResolveMode int
const (
	ResolveModeDefault ResolveMode = iota
	ResolveModeForcePull
	ResolveModePreferLocal
)

func ParseImageResolveMode added in v0.13.0

func ParseImageResolveMode(v string) (ResolveMode, error)

func (ResolveMode) String added in v0.13.0

func (r ResolveMode) String() string

type Resolver added in v0.8.0

type Resolver struct {
	remotes.Resolver
	// contains filtered or unexported fields
}

Resolver is a wrapper around remotes.Resolver

func (*Resolver) Fetcher added in v0.8.0

func (r *Resolver) Fetcher(ctx context.Context, ref string) (remotes.Fetcher, error)

Fetcher returns a new fetcher for the provided reference.

func (*Resolver) HostsFunc added in v0.9.0

func (r *Resolver) HostsFunc(host string) ([]docker.RegistryHost, error)

HostsFunc implements registry configuration of this Resolver

func (*Resolver) Resolve added in v0.8.0

func (r *Resolver) Resolve(ctx context.Context, ref string) (string, ocispecs.Descriptor, error)

Resolve attempts to resolve the reference into a name and descriptor.

func (*Resolver) WithImageStore added in v0.8.0

func (r *Resolver) WithImageStore(is images.Store, mode ResolveMode) *Resolver

WithImageStore returns new resolver that can also resolve from local images store

func (*Resolver) WithSession added in v0.8.0

func (r *Resolver) WithSession(s session.Group) *Resolver

WithSession returns a new resolver that works with new session group

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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