groot

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2017 License: Apache-2.0 Imports: 13 Imported by: 17

Documentation

Index

Constants

View Source
const (
	GlobalLockKey           = "global-groot-lock"
	MetricImageCreationTime = "ImageCreationTime"
	MetricImageDeletionTime = "ImageDeletionTime"
	MetricImageStatsTime    = "ImageStatsTime"
	MetricImageCleanTime    = "ImageCleanTime"
)
View Source
const ImageReferenceFormat = "image:%s"
View Source
const NamespaceFilename = "namespace.json"

Variables

This section is empty.

Functions

func IamCleaner added in v0.2.0

func IamCleaner(locksmith Locksmith, sm StoreMeasurer,
	gc GarbageCollector, metricsEmitter MetricsEmitter,
) *cleaner

Types

type BaseImage added in v0.4.0

type BaseImage struct {
	VolumePath string
	BaseImage  specsv1.Image
	ChainIDs   []string
}

type BaseImagePuller added in v0.4.0

type BaseImagePuller interface {
	Pull(logger lager.Logger, spec BaseImageSpec) (BaseImage, error)
}

type BaseImageSpec added in v0.4.0

type BaseImageSpec struct {
	DiskLimit                 int64
	ExcludeBaseImageFromQuota bool
	BaseImageSrc              *url.URL
	UIDMappings               []IDMappingSpec
	GIDMappings               []IDMappingSpec
	OwnerUID                  int
	OwnerGID                  int
}

type Cleaner added in v0.2.0

type Cleaner interface {
	Clean(logger lager.Logger, threshold int64, keepImages []string, acquireLock bool) (bool, error)
}

type CreateSpec

type CreateSpec struct {
	ID                          string
	BaseImage                   string
	DiskLimit                   int64
	Json                        bool
	Mount                       bool
	ExcludeBaseImageFromQuota   bool
	CleanOnCreate               bool
	CleanOnCreateThresholdBytes int64
	CleanOnCreateIgnoreImages   []string
	UIDMappings                 []IDMappingSpec
	GIDMappings                 []IDMappingSpec
}

type Creator added in v0.2.0

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

func IamCreator added in v0.2.0

func IamCreator(
	imageCloner ImageCloner, baseImagePuller BaseImagePuller,
	locksmith Locksmith, rootFSConfigurer RootFSConfigurer,
	dependencyManager DependencyManager, metricsEmitter MetricsEmitter, cleaner Cleaner,
	namespaceChecker NamespaceChecker) *Creator

func (*Creator) Create added in v0.2.0

func (c *Creator) Create(logger lager.Logger, spec CreateSpec) (ImageInfo, error)

type Deleter added in v0.2.0

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

func IamDeleter added in v0.2.0

func IamDeleter(imageCloner ImageCloner, dependencyManager DependencyManager, metricsEmitter MetricsEmitter) *Deleter

func (*Deleter) Delete added in v0.2.0

func (d *Deleter) Delete(logger lager.Logger, id string) error

type DependencyManager added in v0.2.0

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

type DiskUsage

type DiskUsage struct {
	TotalBytesUsed     int64 `json:"total_bytes_used"`
	ExclusiveBytesUsed int64 `json:"exclusive_bytes_used"`
}

type GarbageCollector added in v0.2.0

type GarbageCollector interface {
	Collect(logger lager.Logger, keepBaseImages []string) error
}

type IDMappingSpec

type IDMappingSpec struct {
	HostID      int
	NamespaceID int
	Size        int
}

type ImageCloner added in v0.4.0

type ImageCloner interface {
	Exists(id string) (bool, error)
	Create(logger lager.Logger, spec ImageSpec) (ImageInfo, error)
	Destroy(logger lager.Logger, id string) error
	Stats(logger lager.Logger, id string) (VolumeStats, error)
}

type ImageInfo added in v0.16.0

type ImageInfo struct {
	Rootfs string         `json:"rootfs"`
	Config *specsv1.Image `json:"config,omitempty"`
	Mount  *MountInfo     `json:"mount,omitempty"`
	Path   string         `json:"-"`
}

type ImageSpec

type ImageSpec struct {
	ID                        string
	Mount                     bool
	DiskLimit                 int64
	ExcludeBaseImageFromQuota bool
	BaseVolumeIDs             []string
	BaseImage                 specsv1.Image
	OwnerUID                  int
	OwnerGID                  int
}

type Lister added in v0.5.0

type Lister struct {
}

func IamLister added in v0.5.0

func IamLister() *Lister

func (*Lister) List added in v0.5.0

func (l *Lister) List(logger lager.Logger, storePath string) ([]string, error)

type Locksmith

type Locksmith interface {
	Lock(key string) (*os.File, error)
	Unlock(lockFile *os.File) error
}

type MetricsEmitter added in v0.5.0

type MetricsEmitter interface {
	TryEmitDuration(logger lager.Logger, name string, duration time.Duration)
}

type MountInfo added in v0.16.0

type MountInfo struct {
	Destination string   `json:"destination"`
	Type        string   `json:"type"`
	Source      string   `json:"source"`
	Options     []string `json:"options"`
}

type NamespaceChecker added in v0.7.0

type NamespaceChecker interface {
	Check(uidMappings, gidMappings []IDMappingSpec) (bool, error)
}

type RootFSConfigurer added in v0.4.0

type RootFSConfigurer interface {
	Configure(rootFSPath string, baseImage specsv1.Image) error
}

type Statser added in v0.5.0

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

func IamStatser added in v0.5.0

func IamStatser(imageCloner ImageCloner, metricsEmitter MetricsEmitter) *Statser

func (*Statser) Stats added in v0.5.0

func (m *Statser) Stats(logger lager.Logger, id string) (VolumeStats, error)

type StoreMeasurer added in v0.2.0

type StoreMeasurer interface {
	MeasureStore(logger lager.Logger) (int64, error)
}

type StoreNamespacer added in v0.16.0

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

func NewStoreNamespacer added in v0.16.0

func NewStoreNamespacer(storePath string) *StoreNamespacer

func (*StoreNamespacer) Check added in v0.16.0

func (n *StoreNamespacer) Check(uidMappings, gidMappings []IDMappingSpec) (bool, error)

func (*StoreNamespacer) Write added in v0.16.0

func (n *StoreNamespacer) Write(storePath string, uidMappings, gidMappings []IDMappingSpec) error

type VolumeStats added in v0.5.0

type VolumeStats struct {
	DiskUsage DiskUsage `json:"disk_usage"`
}

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