repository_fetcher

package
v0.0.0-...-33bca21 Latest Latest
Warning

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

Go to latest
Published: May 7, 2015 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RegistryNewEndpoint = registry.NewEndpoint

apes dockers registry.NewEndpoint

View Source
var RegistryNewSession = registry.NewSession

apes dockers registry.NewSession

Functions

This section is empty.

Types

type DockerRepositoryFetcher

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

func (*DockerRepositoryFetcher) Fetch

func (fetcher *DockerRepositoryFetcher) Fetch(
	logger lager.Logger,
	repoURL *url.URL,
	tag string,
) (string, process.Env, []string, error)

type Graph

type Graph interface {
	Get(name string) (*image.Image, error)
	Exists(imageID string) bool
	Register(image *image.Image, layer archive.ArchiveReader) error
}

apes docker's *graph.Graph

type InsecureRegistryError

type InsecureRegistryError struct {
	Cause              error
	Endpoint           string
	InsecureRegistries []string
}

func (InsecureRegistryError) Error

func (err InsecureRegistryError) Error() string

type Registry

type Registry interface {
	GetRepositoryData(repoName string) (*registry.RepositoryData, error)
	GetRemoteTags(registries []string, repository string, token []string) (map[string]string, error)
	GetRemoteHistory(imageID string, registry string, token []string) ([]string, error)
	GetRemoteImageJSON(imageID string, registry string, token []string) ([]byte, int, error)
	GetRemoteImageLayer(imageID string, registry string, token []string, size int64) (io.ReadCloser, error)
}

apes docker's *registry.Registry

type RegistryProvider

type RegistryProvider interface {
	ProvideRegistry(hostname string) (Registry, error)
	ApplyDefaultHostname(hostname string) string
}

func NewRepositoryProvider

func NewRepositoryProvider(defaultHostname string, insecureRegistries []string) RegistryProvider

type RepositoryFetcher

type RepositoryFetcher interface {
	Fetch(logger lager.Logger, url *url.URL, tag string) (imageID string, envvars process.Env, volumes []string, err error)
}

func New

func New(registry RegistryProvider, graph Graph) RepositoryFetcher

type Retryable

type Retryable struct {
	RepositoryFetcher
}

func (Retryable) Fetch

func (retryable Retryable) Fetch(logger lager.Logger, repoName *url.URL, tag string) (string, process.Env, []string, error)

Directories

Path Synopsis
This file was generated by counterfeiter This file was generated by counterfeiter
This file was generated by counterfeiter This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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