resolver

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Containerd

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

Containerd resolver to push to/pull from containerd. Due to an inability to know when a pusher is complete, we complete here on the Containerd resolver, which means this should be used exactly once for Pusher, and then discarded, as finalize will be called. See https://github.com/oras-project/oras/issues/172 When the above is fixed, we can do better with this.

func NewContainerd

func NewContainerd(ctx context.Context, address, namespace string) (context.Context, *Containerd, error)

NewContainerd create a containerd ResolverFinalizer given the containerd address and namespace (optional)

func NewContainerdWithClient

func NewContainerdWithClient(ctx context.Context, client *containerd.Client) (context.Context, *Containerd, error)

NewContainerdWithClient create a containerd ResolverFinalizer with an existing containerd client connection

func (*Containerd) Context

func (d *Containerd) Context() context.Context

func (Containerd) Fetcher

func (d Containerd) Fetcher(ctx context.Context, ref string) (remotes.Fetcher, error)

func (*Containerd) Finalize

func (d *Containerd) Finalize(ctx context.Context) error

func (*Containerd) Pusher

func (d *Containerd) Pusher(ctx context.Context, ref string) (remotes.Pusher, error)

func (*Containerd) Resolve

func (d *Containerd) Resolve(ctx context.Context, ref string) (name string, desc ocispec.Descriptor, err error)

type Directory

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

func NewDirectory

func NewDirectory(ctx context.Context, dir string) (context.Context, *Directory, error)

func (*Directory) Context

func (d *Directory) Context() context.Context

func (Directory) Fetcher

func (d Directory) Fetcher(ctx context.Context, ref string) (remotes.Fetcher, error)

func (*Directory) Finalize

func (d *Directory) Finalize(ctx context.Context) error

func (*Directory) Pusher

func (d *Directory) Pusher(ctx context.Context, ref string) (remotes.Pusher, error)

func (*Directory) Resolve

func (d *Directory) Resolve(ctx context.Context, ref string) (name string, desc ocispec.Descriptor, err error)

type Registry

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

func NewRegistry

func NewRegistry(ctx context.Context) (context.Context, *Registry, error)

func (*Registry) Context

func (r *Registry) Context() context.Context

func (*Registry) Finalize

func (r *Registry) Finalize(ctx context.Context) error

type Resolver

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

Resolver resolver to push to/pull using passed resolver

func NewResolver

func NewResolver(ctx context.Context, resolver remotes.Resolver) (context.Context, *Resolver, error)

func (*Resolver) Context

func (r *Resolver) Context() context.Context

func (*Resolver) Finalize

func (r *Resolver) Finalize(ctx context.Context) error

type ResolverCloser

type ResolverCloser interface {
	remotes.Resolver
	Context() context.Context
	Finalize(ctx context.Context) error
}

Jump to

Keyboard shortcuts

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