Documentation
¶
Index ¶
- type LocalProvider
- func (pvd *LocalProvider) Client() *containerd.Client
- func (pvd *LocalProvider) ContentStore() content.Store
- func (pvd *LocalProvider) Image() containerd.Image
- func (pvd *LocalProvider) Pull(ctx context.Context, ref string) error
- func (pvd *LocalProvider) Push(ctx context.Context, desc ocispec.Descriptor, ref string) error
- func (pvd *LocalProvider) Resolver(ctx context.Context, ref string) (remotes.Resolver, error)
- func (pvd *LocalProvider) Snapshotter() snapshots.Snapshotter
- type Provider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalProvider ¶
type LocalProvider struct {
// contains filtered or unexported fields
}
func (*LocalProvider) Client ¶
func (pvd *LocalProvider) Client() *containerd.Client
func (*LocalProvider) ContentStore ¶
func (pvd *LocalProvider) ContentStore() content.Store
func (*LocalProvider) Image ¶
func (pvd *LocalProvider) Image() containerd.Image
func (*LocalProvider) Push ¶
func (pvd *LocalProvider) Push(ctx context.Context, desc ocispec.Descriptor, ref string) error
func (*LocalProvider) Snapshotter ¶
func (pvd *LocalProvider) Snapshotter() snapshots.Snapshotter
type Provider ¶
type Provider interface {
// Resolve attempts to resolve the reference into a name and descriptor.
Resolver(ctx context.Context, ref string) (remotes.Resolver, error)
// Pull pulls source image from remote registry by specified reference.
// This pulls all platforms of the image but Image() returns containerd.Image for
// the default platoform.
Pull(ctx context.Context, ref string) error
// Push pushes target image to remote registry by specified reference,
// the desc parameter represents the manifest of targe image.
Push(ctx context.Context, desc ocispec.Descriptor, ref string) error
// Image gets the source image object.
Image() containerd.Image
// Snapshotter gets the snapshotter object of containerd.
Snapshotter() snapshots.Snapshotter
// ContentStore gets the content store object of containerd.
ContentStore() content.Store
// Client gets the raw containerd client.
Client() *containerd.Client
}
Provider provides necessary image utils, image content store for image conversion.
func NewLocalProvider ¶
func NewLocalProvider( cfg *config.ProviderConfig, client *containerd.Client, snapshotter snapshots.Snapshotter, ) (Provider, error)
Click to show internal directories.
Click to hide internal directories.