groot

package
v0.28.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2017 License: Apache-2.0 Imports: 14 Imported by: 17

Documentation

Index

Constants

View Source
const (
	GlobalLockKey                      = "global-groot-lock"
	MetricImageCreationTime            = "ImageCreationTime"
	MetricImageDeletionTime            = "ImageDeletionTime"
	MetricImageStatsTime               = "ImageStatsTime"
	MetricImageCleanTime               = "ImageCleanTime"
	MetricDiskCachePercentage          = "DiskCachePercentage"
	MetricDiskCommittedPercentage      = "DiskCommittedPercentage"
	MetricDiskPurgeableCachePercentage = "DiskPurgeableCachePercentage"
)
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 {
	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, cacheSize int64) (bool, error)
}

type CreateSpec

type CreateSpec struct {
	ID                        string
	BaseImageURL              *url.URL
	DiskLimit                 int64
	Mount                     bool
	ExcludeBaseImageFromQuota bool
	CleanOnCreate             bool
	CleanOnCreateCacheBytes   int64
	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, dependencyManager DependencyManager,
	metricsEmitter MetricsEmitter, cleaner Cleaner) *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 {
	UnusedVolumes(logger lager.Logger) ([]string, error)
	MarkUnused(logger lager.Logger, unusedVolumes []string) error
	Collect(logger lager.Logger) error
}

type IDMappingSpec

type IDMappingSpec struct {
	HostID      int
	NamespaceID int
	Size        int
}

type IDMappings added in v0.20.0

type IDMappings struct {
	UIDMappings []IDMappingSpec
	GIDMappings []IDMappingSpec
}

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"`
	Image  specsv1.Image `json:"image,omitempty"`
	Mounts []MountInfo   `json:"mounts,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 {
	TryEmitUsage(logger lager.Logger, name string, usage int64, units string)
	TryEmitDurationFrom(logger lager.Logger, name string, from time.Time)
}

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 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 {
	Usage(logger lager.Logger) (int64, error)
	CacheUsage(logger lager.Logger, volumes []string) int64
}

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) ApplyMappings added in v0.20.0

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

func (*StoreNamespacer) Read added in v0.20.0

func (n *StoreNamespacer) Read() (IDMappings, error)

type VolumeStats added in v0.5.0

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

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