rootfs_provider

package
v0.0.0-...-be7a702 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CakeOrdinator

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

CakeOrdinator manages a cake, fetching layers as neccesary

func NewCakeOrdinator

func NewCakeOrdinator(cake layercake.Cake, fetcher RepositoryFetcher, layerCreator LayerCreator, metrics Metricser, gc GCer) *CakeOrdinator

New creates a new cake-ordinator, there should only be one CakeOrdinator for a particular cake.

func (*CakeOrdinator) Create

func (c *CakeOrdinator) Create(logger lager.Logger, id string, spec Spec) (string, []string, error)

func (*CakeOrdinator) Destroy

func (c *CakeOrdinator) Destroy(logger lager.Logger, id string) error

func (*CakeOrdinator) GC

func (c *CakeOrdinator) GC(logger lager.Logger) error

func (*CakeOrdinator) Metrics

func (c *CakeOrdinator) Metrics(logger lager.Logger, id string) (garden.ContainerDiskStat, error)

type ContainerLayerCreator

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

func NewLayerCreator

func NewLayerCreator(
	graph Graph,
	volumeCreator VolumeCreator,
	namespacer Namespacer,
) *ContainerLayerCreator

func (*ContainerLayerCreator) Create

func (provider *ContainerLayerCreator) Create(log lager.Logger, id string, parentImage *repository_fetcher.Image, spec Spec) (string, []string, error)

type GCer

type GCer interface {
	GC(log lager.Logger, cake layercake.Cake) error
}

type GetUsageFunc

type GetUsageFunc func(logger lager.Logger, rootfsPath string) (garden.ContainerDiskStat, error)

type Graph

type Graph interface {
	layercake.Cake
}

type LayerCreator

type LayerCreator interface {
	Create(log lager.Logger, id string, parentImage *repository_fetcher.Image, spec Spec) (string, []string, error)
}

type Mapper

type Mapper interface {
	Map(id int) int
}

type MappingList

type MappingList []specs.IDMapping

func (MappingList) Map

func (m MappingList) Map(id int) int

func (MappingList) String

func (m MappingList) String() string

type MetricsAdapter

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

MetricsAdapter implements cakeordinator.Metricser using existing quota_manager.GetUsage func

func NewMetricsAdapter

func NewMetricsAdapter(fn GetUsageFunc, id2path func(layercake.ID) string) MetricsAdapter

func (MetricsAdapter) Metrics

type Metricser

type Metricser interface {
	Metrics(logger lager.Logger, id layercake.ID) (garden.ContainerDiskStat, error)
}

type Namespacer

type Namespacer interface {
	CacheKey() string
	Namespace(log lager.Logger, rootfsPath string) error
}

type RepositoryFetcher

type RepositoryFetcher interface {
	Fetch(*url.URL, int64) (*repository_fetcher.Image, error)
}

type SimpleVolumeCreator

type SimpleVolumeCreator struct{}

SimpleVolumeCreator implements volume creation by (simply) creating the relevant directories. If a directory already exists in the image it is emptied.

func (SimpleVolumeCreator) Create

func (SimpleVolumeCreator) Create(root string, volume string) error

type Spec

type Spec struct {
	RootFS     *url.URL
	Namespaced bool
	QuotaSize  int64
	QuotaScope garden.DiskLimitScope
}

type StringMapper

type StringMapper interface {
	fmt.Stringer
	Mapper
}

type Translator

type Translator interface {
	CacheKey() string
	Translate(path string, info os.FileInfo, err error) error
}

type UidNamespacer

type UidNamespacer struct {
	Translator Translator
}

func (*UidNamespacer) CacheKey

func (n *UidNamespacer) CacheKey() string

func (*UidNamespacer) Namespace

func (n *UidNamespacer) Namespace(log lager.Logger, rootfsPath string) error

type UidTranslator

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

func NewUidTranslator

func NewUidTranslator(uidMappings StringMapper, gidMappings StringMapper) *UidTranslator

func (UidTranslator) CacheKey

func (u UidTranslator) CacheKey() string

func (UidTranslator) Translate

func (u UidTranslator) Translate(path string, info os.FileInfo, err error) error

type VolumeCreator

type VolumeCreator interface {
	Create(root string, volume 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
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