registry

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package registry provides facilities for reading/writing v1.Images,Indexes from/to a remote image registry. Also exposes an implementation of the authn.Keychain interface

Copyright 2020 VMware, Inc. SPDX-License-Identifier: Apache-2.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Keychain

func Keychain(keychainOpts auth.KeychainOpts, environFunc func() []string) (regauthn.Keychain, error)

Keychain implements an authn.Keychain interface by composing multiple keychains. It enforces an order, where the keychains that contain credentials for a specific target take precedence over keychains that contain credentials for 'any' target. i.e. env keychain takes precedence over the custom keychain. Since env keychain contains credentials per HOSTNAME, and custom keychain doesn't.

Types

type Opts

type Opts struct {
	CACertPaths []string
	VerifyCerts bool
	Insecure    bool

	IncludeNonDistributableLayers bool

	Username string
	Password string
	Token    string
	Anon     bool

	ResponseHeaderTimeout time.Duration
}

type Registry

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

func NewRegistry

func NewRegistry(opts Opts, regOpts ...regremote.Option) (Registry, error)

func (Registry) Digest

func (r Registry) Digest(ref regname.Reference) (regv1.Hash, error)

func (Registry) FirstImageExists added in v0.8.0

func (r Registry) FirstImageExists(digests []string) (string, error)

func (Registry) Get

func (Registry) Image

func (r Registry) Image(ref regname.Reference) (regv1.Image, error)

func (Registry) Index

func (r Registry) Index(ref regname.Reference) (regv1.ImageIndex, error)

func (Registry) ListTags

func (r Registry) ListTags(repo regname.Repository) ([]string, error)

func (Registry) MultiWrite

func (r Registry) MultiWrite(imageOrIndexesToUpload map[regname.Reference]regremote.Taggable, concurrency int, updatesCh chan regv1.Update) error

func (Registry) WriteImage

func (r Registry) WriteImage(ref regname.Reference, img regv1.Image) error

func (Registry) WriteIndex

func (r Registry) WriteIndex(ref regname.Reference, idx regv1.ImageIndex) error

func (Registry) WriteTag

func (r Registry) WriteTag(ref regname.Tag, taggagle regremote.Taggable) error

type WithProgress added in v0.9.0

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

func NewRegistryWithProgress added in v0.9.0

func NewRegistryWithProgress(reg Registry, logger util.ProgressLogger) *WithProgress

func (WithProgress) Digest added in v0.9.0

func (w WithProgress) Digest(reference regname.Reference) (regv1.Hash, error)

func (WithProgress) FirstImageExists added in v0.9.0

func (w WithProgress) FirstImageExists(digests []string) (string, error)

func (WithProgress) Get added in v0.9.0

func (w WithProgress) Get(reference regname.Reference) (*remote.Descriptor, error)

func (WithProgress) Image added in v0.9.0

func (w WithProgress) Image(reference regname.Reference) (regv1.Image, error)

func (WithProgress) Index added in v0.9.0

func (w WithProgress) Index(reference regname.Reference) (regv1.ImageIndex, error)

func (*WithProgress) MultiWrite added in v0.9.0

func (w *WithProgress) MultiWrite(imageOrIndexesToUpload map[regname.Reference]remote.Taggable, concurrency int, _ chan regv1.Update) error

func (WithProgress) WriteImage added in v0.9.0

func (w WithProgress) WriteImage(reference regname.Reference, image regv1.Image) error

func (WithProgress) WriteIndex added in v0.9.0

func (w WithProgress) WriteIndex(reference regname.Reference, index regv1.ImageIndex) error

func (WithProgress) WriteTag added in v0.9.0

func (w WithProgress) WriteTag(tag regname.Tag, taggable remote.Taggable) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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