Documentation
¶
Index ¶
- type Containerd
- func (d *Containerd) Context() context.Context
- func (d Containerd) Fetcher(ctx context.Context, ref string) (remotes.Fetcher, error)
- func (d *Containerd) Finalize(ctx context.Context) error
- func (d *Containerd) Pusher(ctx context.Context, ref string) (remotes.Pusher, error)
- func (d *Containerd) Resolve(ctx context.Context, ref string) (name string, desc ocispec.Descriptor, err error)
- type Directory
- func (d *Directory) Context() context.Context
- func (d Directory) Fetcher(ctx context.Context, ref string) (remotes.Fetcher, error)
- func (d *Directory) Finalize(ctx context.Context) error
- func (d *Directory) Pusher(ctx context.Context, ref string) (remotes.Pusher, error)
- func (d *Directory) Resolve(ctx context.Context, ref string) (name string, desc ocispec.Descriptor, err error)
- type Registry
- type RegistryOpt
- type Resolver
- type ResolverCloser
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/deislabs/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) 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 ¶
type Registry ¶
func NewRegistry ¶
NewRegistry create a Registry resolver that reaches the registry over HTTPS.
func NewRegistryWithOpts ¶
func NewRegistryWithOpts(ctx context.Context, opts ...RegistryOpt) (context.Context, *Registry, error)
NewRegistryWithOpts create a Registry resolver configured by opts.
type RegistryOpt ¶
type RegistryOpt func(*registryOpts)
RegistryOpt configures a Registry created by NewRegistryWithOpts.
func WithPlainHTTP ¶
func WithPlainHTTP() RegistryOpt
WithPlainHTTP directs the resolver to contact the registry over HTTP rather than HTTPS, for a registry served without TLS such as a lab-local or test registry.