resolver

package
v1.0.0-beta.16 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func ReleasePullLeasesAfterRestart

func ReleasePullLeasesAfterRestart(ctx context.Context, lm leases.Manager) error

ReleasePullLeasesAfterRestart removes leases whose owners died with the previous engine. Call after restoring durable owners and before serving work.

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 ListImageTagsOpts

type ListImageTagsOpts struct {
	Network           NetworkConfig
	RegistryTransport RegistryTransport
}

type NetworkConfig added in v0.21.6

type NetworkConfig struct {
	DNS         *oci.DNSConfig
	HostAliases map[string]string
}

NetworkConfig carries the Dagger DNS view used by registry operations for a container with service bindings.

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
	Network           NetworkConfig
	RegistryTransport RegistryTransport
}

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 {
	RegistryTransport RegistryTransport
	ByDigest          bool
	Network           NetworkConfig
}

type PushedImage

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

type RegistryProtocol

type RegistryProtocol string
const (
	RegistryProtocolHTTPS RegistryProtocol = "https"
	RegistryProtocolHTTP  RegistryProtocol = "http"
)

type RegistryTransport

type RegistryTransport struct {
	Protocol              RegistryProtocol
	InsecureSkipTLSVerify bool
}

func (RegistryTransport) CacheKey

func (transport RegistryTransport) CacheKey() string

type ResolveImageConfigOpts

type ResolveImageConfigOpts struct {
	Platform          *ocispecs.Platform
	ResolveMode       ResolveMode
	Network           NetworkConfig
	RegistryTransport RegistryTransport
}

type ResolveImageDigestOpts

type ResolveImageDigestOpts struct {
	Network           NetworkConfig
	RegistryTransport RegistryTransport
}

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) ListImageTags

func (r *Resolver) ListImageTags(ctx context.Context, ref string, opts ListImageTagsOpts) ([]string, error)

ListImageTags lists every tag for an image repository using the same registry hosts, authentication, transport, and network as image pulls.

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)

func (*Resolver) ResolveImageDigest

func (r *Resolver) ResolveImageDigest(
	ctx context.Context,
	ref string,
	opts ResolveImageDigestOpts,
) (_ string, _ digest.Digest, rerr error)

ResolveImageDigest resolves an image reference to its root descriptor digest without selecting a platform-specific manifest.

Jump to

Keyboard shortcuts

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