containerdregistry

package
v1.13.2 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2020 License: Apache-2.0 Imports: 33 Imported by: 18

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewResolver

func NewResolver(configDir string, insecure bool, roots *x509.CertPool) (remotes.Resolver, error)

Types

type Registry

type Registry struct {
	Store
	// contains filtered or unexported fields
}

Registry enables manipulation of images via containerd modules.

func NewRegistry

func NewRegistry(options ...RegistryOption) (registry *Registry, err error)

NewRegistry returns a new containerd Registry and a function to destroy it after use. The destroy function is safe to call more than once, but is a no-op after the first call.

func (*Registry) Destroy

func (r *Registry) Destroy() (err error)

Destroy cleans up the on-disk boltdb file and other cache files, unless preserve cache is true

func (*Registry) Labels

func (r *Registry) Labels(ctx context.Context, ref image.Reference) (map[string]string, error)

Labels gets the labels for an image reference.

func (*Registry) Pull

func (r *Registry) Pull(ctx context.Context, ref image.Reference) error

Pull fetches and stores an image by reference.

func (*Registry) Unpack

func (r *Registry) Unpack(ctx context.Context, ref image.Reference, dir string) error

Unpack writes the unpackaged content of an image to a directory. If the referenced image does not exist in the registry, an error is returned.

type RegistryConfig

type RegistryConfig struct {
	Log               *logrus.Entry
	ResolverConfigDir string
	DBPath            string
	CacheDir          string
	PreserveCache     bool
	SkipTLS           bool
	Roots             *x509.CertPool
}

type RegistryOption

type RegistryOption func(config *RegistryConfig)

func PreserveCache

func PreserveCache(preserve bool) RegistryOption

func SkipTLS added in v1.7.0

func SkipTLS(skip bool) RegistryOption

func WithCacheDir

func WithCacheDir(dir string) RegistryOption

func WithLog

func WithLog(log *logrus.Entry) RegistryOption

func WithResolverConfigDir

func WithResolverConfigDir(path string) RegistryOption

func WithRootCAs

func WithRootCAs(pool *x509.CertPool) RegistryOption

type Store

type Store interface {
	Images() images.Store
	Content() content.Store
}

Jump to

Keyboard shortcuts

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