resolver

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2026 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCredentialsNotFound = errors.New("registry credentials not found")

Functions

This section is empty.

Types

type AuthSource

type AuthSource interface {
	Credentials(ctx context.Context, host string) (Credentials, error)
}

func NewSessionAuthSource

func NewSessionAuthSource(
	authProvider *auth.RegistryAuthProvider,
	getMainClientConn func(context.Context) (*grpc.ClientConn, error),
) AuthSource

type Credentials

type Credentials struct {
	Username string
	Secret   string
}

type Opts

type Opts struct {
	Hosts        docker.RegistryHosts
	Auth         AuthSource
	ContentStore content.Store
	LeaseManager leases.Manager
}

type PullOpts

type PullOpts struct {
	Platform    ocispecs.Platform
	ResolveMode ResolveMode
	LayerLimit  *int
}

type PulledImage

type PulledImage struct {
	Ref          string
	ManifestDesc ocispecs.Descriptor
	ConfigDesc   ocispecs.Descriptor
	Layers       []ocispecs.Descriptor
	Nonlayers    []ocispecs.Descriptor
	// contains filtered or unexported fields
}

func (*PulledImage) Release

func (img *PulledImage) Release(ctx context.Context) error

type PushOpts

type PushOpts struct {
	Insecure bool
	ByDigest bool
}

type PushedImage

type PushedImage struct {
	RootDesc          ocispecs.Descriptor
	Provider          content.InfoReaderProvider
	SourceAnnotations map[digest.Digest]map[string]string
}

type ResolveImageConfigOpts

type ResolveImageConfigOpts struct {
	Platform    *ocispecs.Platform
	ResolveMode ResolveMode
}

type ResolveMode

type ResolveMode int
const (
	ResolveModeDefault ResolveMode = iota
	ResolveModeForcePull
)

type Resolver

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

func New

func New(opts Opts) *Resolver

func (*Resolver) Close

func (r *Resolver) Close() error

func (*Resolver) Pull

func (r *Resolver) Pull(ctx context.Context, ref string, opts PullOpts) (_ *PulledImage, rerr error)

func (*Resolver) PushImage

func (r *Resolver) PushImage(ctx context.Context, img *PushedImage, ref string, opts PushOpts) (rerr error)

func (*Resolver) ResolveImageConfig

func (r *Resolver) ResolveImageConfig(
	ctx context.Context,
	ref string,
	opts ResolveImageConfigOpts,
) (_ string, _ digest.Digest, _ []byte, rerr error)

Jump to

Keyboard shortcuts

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