containerstore

package
v0.0.0-...-1ada680 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2017 License: Apache-2.0 Imports: 32 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	CredCreationSucceededCount    = "CredCreationSucceededCount"
	CredCreationSucceededDuration = "CredCreationSucceededDuration"
	CredCreationFailedCount       = "CredCreationFailedCount"
)
View Source
const (
	GardenContainerCreationDuration             = "GardenContainerCreationDuration"
	GardenContainerCreationSucceededDuration    = "GardenContainerCreationSucceededDuration"
	GardenContainerCreationFailedDuration       = "GardenContainerCreationFailedDuration"
	GardenContainerDestructionSucceededDuration = "GardenContainerDestructionSucceededDuration"
	GardenContainerDestructionFailedDuration    = "GardenContainerDestructionFailedDuration"
)

To be deprecated

View Source
const BindMountCleanupFailed = "failed to cleanup bindmount artifacts"
View Source
const ContainerExpirationMessage = "expired container"
View Source
const ContainerInitializationFailedMessage = "failed to initialize container"
View Source
const ContainerMissingMessage = "missing garden container"
View Source
const ContainerOwnerProperty = "executor:owner"
View Source
const CredDirFailed = "failed to create credentials directory"
View Source
const DownloadCachedDependenciesFailed = "failed to download cached artifacts"
View Source
const VolmanMountFailed = "failed to mount volume"

Variables

View Source
var (
	ErrFailedToCAS = errors.New("failed-to-cas")
)
View Source
var ErrIPRangeConversionFailed = errors.New("failed to convert destination to ip range")

Functions

This section is empty.

Types

type BindMountCacheKey

type BindMountCacheKey struct {
	CacheKey string
	Dir      string
}

func NewbindMountCacheKey

func NewbindMountCacheKey(cacheKey, dir string) BindMountCacheKey

type BindMounts

type BindMounts struct {
	CacheKeys        []BindMountCacheKey
	GardenBindMounts []garden.BindMount
}

func NewBindMounts

func NewBindMounts(capacity int) BindMounts

func (*BindMounts) AddBindMount

func (b *BindMounts) AddBindMount(cacheKey string, mount garden.BindMount)

type ContainerConfig

type ContainerConfig struct {
	OwnerName    string
	INodeLimit   uint64
	MaxCPUShares uint64

	ReservedExpirationTime time.Duration
	ReapInterval           time.Duration
}

type ContainerStore

type ContainerStore interface {
	// Setters
	Reserve(logger lager.Logger, req *executor.AllocationRequest) (executor.Container, error)
	Destroy(logger lager.Logger, guid string) error

	// Container Operations
	Initialize(logger lager.Logger, req *executor.RunRequest) error
	Create(logger lager.Logger, guid string) (executor.Container, error)
	Run(logger lager.Logger, guid string) error
	Stop(logger lager.Logger, guid string) error

	// Getters
	Get(logger lager.Logger, guid string) (executor.Container, error)
	List(logger lager.Logger) []executor.Container
	Metrics(logger lager.Logger) (map[string]executor.ContainerMetrics, error)
	RemainingResources(logger lager.Logger) executor.ExecutorResources
	GetFiles(logger lager.Logger, guid, sourcePath string) (io.ReadCloser, error)

	// Cleanup
	NewRegistryPruner(logger lager.Logger) ifrit.Runner
	NewContainerReaper(logger lager.Logger) ifrit.Runner

	// shutdown the dependency manager
	Cleanup(logger lager.Logger)
}

func New

func New(
	containerConfig ContainerConfig,
	totalCapacity *executor.ExecutorResources,
	gardenClient garden.Client,
	dependencyManager DependencyManager,
	volumeManager volman.Manager,
	credManager CredManager,
	clock clock.Clock,
	eventEmitter event.Hub,
	transformer transformer.Transformer,
	trustedSystemCertificatesPath string,
	metronClient loggregator_v2.IngressClient,
	declarativeHealthcheckPath string,
) ContainerStore

type CredManager

type CredManager interface {
	CreateCredDir(lager.Logger, executor.Container) ([]garden.BindMount, []executor.EnvironmentVariable, error)
	Runner(lager.Logger, executor.Container) ifrit.Runner
}

func NewCredManager

func NewCredManager(
	logger lager.Logger,
	metronClient loggregator_v2.IngressClient,
	credDir string,
	validityPeriod time.Duration,
	entropyReader io.Reader,
	clock clock.Clock,
	CaCert *x509.Certificate,
	privateKey *rsa.PrivateKey,
	containerMountPath string,
) CredManager

func NewNoopCredManager

func NewNoopCredManager() CredManager

type DependencyManager

type DependencyManager interface {
	DownloadCachedDependencies(logger lager.Logger, mounts []executor.CachedDependency, logStreamer log_streamer.LogStreamer) (BindMounts, error)
	ReleaseCachedDependencies(logger lager.Logger, keys []BindMountCacheKey) error
	Stop(logger lager.Logger)
}

func NewDependencyManager

func NewDependencyManager(cache cacheddownloader.CachedDownloader, downloadRateLimiter chan struct{}) DependencyManager

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