groot

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const GLOBAL_LOCK_KEY = "global-groot-lock"

Variables

This section is empty.

Functions

This section is empty.

Types

type Bundle

type Bundle interface {
	Path() string
	RootFSPath() string
}

type BundleSpec

type BundleSpec struct {
	DiskLimit             int64
	ExcludeImageFromQuota bool
	VolumePath            string
	Image                 specsv1.Image
}

type Bundler

type Bundler interface {
	Exists(id string) (bool, error)
	Create(logger lager.Logger, id string, spec BundleSpec) (Bundle, error)
	Destroy(logger lager.Logger, id string) error
	Metrics(logger lager.Logger, id string) (VolumeMetrics, error)
}

type CreateSpec

type CreateSpec struct {
	ID                    string
	Image                 string
	DiskLimit             int64
	ExcludeImageFromQuota bool
	UIDMappings           []IDMappingSpec
	GIDMappings           []IDMappingSpec
}

type DiskUsage

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

type Groot

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

func IamGroot

func IamGroot(bundler Bundler, imagePuller ImagePuller, locksmith Locksmith) *Groot

func (*Groot) Create

func (g *Groot) Create(logger lager.Logger, spec CreateSpec) (Bundle, error)

func (*Groot) Delete

func (g *Groot) Delete(logger lager.Logger, id string) error

func (*Groot) Metrics

func (g *Groot) Metrics(logger lager.Logger, id string) (VolumeMetrics, error)

type IDMappingSpec

type IDMappingSpec struct {
	HostID      int
	NamespaceID int
	Size        int
}

type ImagePuller

type ImagePuller interface {
	Pull(logger lager.Logger, spec ImageSpec) (BundleSpec, error)
}

type ImageSpec

type ImageSpec struct {
	DiskLimit             int64
	ExcludeImageFromQuota bool
	ImageSrc              *url.URL
	UIDMappings           []IDMappingSpec
	GIDMappings           []IDMappingSpec
}

type Locksmith

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

type VolumeMetrics

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

Jump to

Keyboard shortcuts

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