imageplugin

package
v0.0.0-...-cf22b21 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2018 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ImageSpecSchemaVersion              = 2
	ImageSpecBaseDirectoryAnnotationKey = "org.cloudfoundry.experimental.image.base-directory"
)
View Source
const PreloadedPlusLayerScheme = "preloaded+layer"

Variables

This section is empty.

Functions

func GenerateImageConfig

func GenerateImageConfig(layerSHAs ...string) imagespec.Image

func GenerateIndex

func GenerateIndex(manifestSHA string) imagespec.Index

func GenerateManifest

func GenerateManifest(layers []Layer, configSHA string) imagespec.Manifest

Types

type CommandCreator

type CommandCreator interface {
	CreateCommand(log lager.Logger, handle string, spec gardener.RootfsSpec) (*exec.Cmd, error)
	DestroyCommand(log lager.Logger, handle string) *exec.Cmd
	MetricsCommand(log lager.Logger, handle string) *exec.Cmd
}

type DefaultCommandCreator

type DefaultCommandCreator struct {
	BinPath   string
	ExtraArgs []string
}

func (*DefaultCommandCreator) CreateCommand

func (cc *DefaultCommandCreator) CreateCommand(log lager.Logger, handle string, spec gardener.RootfsSpec) (*exec.Cmd, error)

func (*DefaultCommandCreator) DestroyCommand

func (cc *DefaultCommandCreator) DestroyCommand(log lager.Logger, handle string) *exec.Cmd

func (*DefaultCommandCreator) MetricsCommand

func (cc *DefaultCommandCreator) MetricsCommand(log lager.Logger, handle string) *exec.Cmd

type ImagePlugin

type ImagePlugin struct {
	UnprivilegedCommandCreator CommandCreator
	PrivilegedCommandCreator   CommandCreator
	ImageSpecCreator           ImageSpecCreator
	CommandRunner              commandrunner.CommandRunner
	DefaultRootfs              string
}

func (*ImagePlugin) Create

func (p *ImagePlugin) Create(log lager.Logger, handle string, spec gardener.RootfsSpec) (specs.Spec, error)

func (*ImagePlugin) Destroy

func (p *ImagePlugin) Destroy(log lager.Logger, handle string) error

func (*ImagePlugin) GC

func (p *ImagePlugin) GC(log lager.Logger) error

func (*ImagePlugin) Metrics

func (p *ImagePlugin) Metrics(log lager.Logger, handle string, namespaced bool) (garden.ContainerDiskStat, error)

type ImageSpecCreator

type ImageSpecCreator interface {
	CreateImageSpec(rootFS *url.URL, handle string) (*url.URL, error)
}

type Layer

type Layer struct {
	URL       string
	SHA256    string
	BaseDir   string
	MediaType string
}

type NotImplementedCommandCreator

type NotImplementedCommandCreator struct {
	Err error
}

func (*NotImplementedCommandCreator) CreateCommand

func (cc *NotImplementedCommandCreator) CreateCommand(log lager.Logger, handle string, spec gardener.RootfsSpec) (*exec.Cmd, error)

func (*NotImplementedCommandCreator) DestroyCommand

func (cc *NotImplementedCommandCreator) DestroyCommand(log lager.Logger, handle string) *exec.Cmd

func (*NotImplementedCommandCreator) MetricsCommand

func (cc *NotImplementedCommandCreator) MetricsCommand(log lager.Logger, handle string) *exec.Cmd

type OCIImageSpecCreator

type OCIImageSpecCreator struct {
	DepotDir             string
	ImageConfigGenerator func(layerSHAs ...string) imagespec.Image
	ManifestGenerator    func(layers []Layer, configSHA string) imagespec.Manifest
	IndexGenerator       func(manifestSHA string) imagespec.Index
}

func NewOCIImageSpecCreator

func NewOCIImageSpecCreator(depotDir string) *OCIImageSpecCreator

func (*OCIImageSpecCreator) CreateImageSpec

func (o *OCIImageSpecCreator) CreateImageSpec(rootFS *url.URL, handle string) (*url.URL, error)

Directories

Path Synopsis
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