resolver

package
v0.9.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2021 License: Apache-2.0 Imports: 32 Imported by: 324

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]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 RegistryConfig added in v0.9.0

type RegistryConfig struct {
	Mirrors      []string     `toml:"mirrors"`
	PlainHTTP    *bool        `toml:"http"`
	Insecure     *bool        `toml:"insecure"`
	RootCAs      []string     `toml:"ca"`
	KeyPairs     []TLSKeyPair `toml:"keypair"`
	TLSConfigDir []string     `toml:"tlsconfigdir"`
}

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, ocispec.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 source.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

type TLSKeyPair added in v0.9.0

type TLSKeyPair struct {
	Key         string `toml:"key"`
	Certificate string `toml:"cert"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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