importer

package
v3.10.0-0.20.0+incompa... Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2018 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const ContextKeyV1RegistryClient = "v1-registry-client"

Add a dockerregistry.Client to the passed context with this key to support v1 Docker registry importing

View Source
const (
	DefaultImageStreamLayerCacheSize = 2048
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageStreamImporter

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

ImageStreamImport implements an import strategy for Docker images. It keeps a cache of images per distinct auth context to reduce duplicate loads. This type is not thread safe.

func NewImageStreamImporter

func NewImageStreamImporter(retriever RepositoryRetriever, maximumTagsPerRepo int, limiter flowcontrol.RateLimiter, cache *ImageStreamLayerCache) *ImageStreamImporter

NewImageStreamImport creates an importer that will load images from a remote Docker registry into an ImageStreamImport object. Limiter may be nil.

func (*ImageStreamImporter) Import

Import tries to complete the provided isi object with images loaded from remote registries.

type ImageStreamLayerCache added in v1.4.0

type ImageStreamLayerCache struct {
	*lru.Cache
}

func NewImageStreamLayerCache added in v1.4.0

func NewImageStreamLayerCache(size int) (ImageStreamLayerCache, error)

ImageStreamLayerCache creates a new LRU cache of layer digests

type Interface

type Interface interface {
	Import(ctx gocontext.Context, isi *imageapi.ImageStreamImport, stream *imageapi.ImageStream) error
}

Interface loads images into an image stream import request.

type RepositoryRetriever

type RepositoryRetriever interface {
	// Repository returns a properly authenticated distribution.Repository for the given registry, repository
	// name, and insecure toleration behavior.
	Repository(ctx gocontext.Context, registry *url.URL, repoName string, insecure bool) (distribution.Repository, error)
}

RepositoryRetriever fetches a Docker distribution.Repository.

type SecretCredentialStore

type SecretCredentialStore struct {
	registryclient.RefreshTokenStore
	// contains filtered or unexported fields
}

func NewCredentialsForSecrets

func NewCredentialsForSecrets(secrets []kapiv1.Secret) *SecretCredentialStore

func NewLazyCredentialsForSecrets

func NewLazyCredentialsForSecrets(secretsFn func() ([]kapiv1.Secret, error)) *SecretCredentialStore

func (*SecretCredentialStore) Basic

func (s *SecretCredentialStore) Basic(url *url.URL) (string, string)

func (*SecretCredentialStore) Err

func (s *SecretCredentialStore) Err() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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