base_image_puller

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2017 License: Apache-2.0 Imports: 14 Imported by: 14

Documentation

Index

Constants

View Source
const BaseImageReferenceFormat = "baseimage:%s"
View Source
const MetricsDownloadTimeName = "DownloadTime"
View Source
const MetricsUnpackTimeName = "UnpackTime"

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseImageInfo

type BaseImageInfo struct {
	LayerInfos []LayerInfo
	Config     specsv1.Image
}

type BaseImagePuller

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

func NewBaseImagePuller

func NewBaseImagePuller(fetcher Fetcher, unpacker Unpacker, volumeDriver VolumeDriver, dependencyRegisterer DependencyRegisterer, metricsEmitter groot.MetricsEmitter, locksmith groot.Locksmith) *BaseImagePuller

func (*BaseImagePuller) Pull

type DependencyRegisterer

type DependencyRegisterer interface {
	Register(id string, chainIDs []string) error
}

type Fetcher

type Fetcher interface {
	BaseImageInfo(logger lager.Logger, baseImageURL *url.URL) (BaseImageInfo, error)
	StreamBlob(logger lager.Logger, baseImageURL *url.URL, layerInfo LayerInfo) (io.ReadCloser, int64, error)
}

type LayerInfo added in v0.27.0

type LayerInfo struct {
	BlobID        string
	ChainID       string
	DiffID        string
	ParentChainID string
	Size          int64
	BaseDirectory string
	URLs          []string
	MediaType     string
}

type UnpackOutput added in v0.26.0

type UnpackOutput struct {
	BytesWritten    int64
	OpaqueWhiteouts []string
}

type UnpackSpec

type UnpackSpec struct {
	Stream        io.ReadCloser `json:"-"`
	TargetPath    string
	UIDMappings   []groot.IDMappingSpec
	GIDMappings   []groot.IDMappingSpec
	BaseDirectory string
}

type Unpacker

type Unpacker interface {
	Unpack(logger lager.Logger, spec UnpackSpec) (UnpackOutput, error)
}

type VolumeDriver

type VolumeDriver interface {
	VolumePath(logger lager.Logger, id string) (string, error)
	CreateVolume(logger lager.Logger, parentID, id string) (string, error)
	DestroyVolume(logger lager.Logger, id string) error
	Volumes(logger lager.Logger) ([]string, error)
	MoveVolume(logger lager.Logger, from, to string) error
	WriteVolumeMeta(logger lager.Logger, id string, data VolumeMeta) error
	HandleOpaqueWhiteouts(logger lager.Logger, id string, opaqueWhiteouts []string) error
}

type VolumeMeta added in v0.26.0

type VolumeMeta struct {
	Size int64
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.
unpackerfakes
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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