Documentation
¶
Index ¶
- Constants
- func RegisterHooks(hs hook.HookSet, runner Runner, config process.Env, ...)
- type ActiveProcess
- type Config
- type Container
- type ContainerProvider
- type ContainerRepository
- type FailedToSnapshotError
- type HandleExistsError
- type HealthChecker
- type Limits
- type LinuxBackend
- func (b *LinuxBackend) ApplyLimits(container Container, limits garden.Limits) error
- func (b *LinuxBackend) BulkInfo(handles []string) (map[string]garden.ContainerInfoEntry, error)
- func (b *LinuxBackend) BulkMetrics(handles []string) (map[string]garden.ContainerMetricsEntry, error)
- func (b *LinuxBackend) Capacity() (garden.Capacity, error)
- func (b *LinuxBackend) Containers(props garden.Properties) ([]garden.Container, error)
- func (b *LinuxBackend) Create(spec garden.ContainerSpec) (garden.Container, error)
- func (b *LinuxBackend) Destroy(handle string) error
- func (b *LinuxBackend) GraceTime(container garden.Container) time.Duration
- func (b *LinuxBackend) Lookup(handle string) (garden.Container, error)
- func (b *LinuxBackend) Ping() error
- func (b *LinuxBackend) Setup() error
- func (b *LinuxBackend) Start() error
- func (b *LinuxBackend) Stop()
- type LinuxContainerSpec
- type MaxContainersReachedError
- type NetInSpec
- type Network
- type ResourcePool
- type Resources
- type RootFSCleaner
- type Runner
- type State
Constants ¶
View Source
const ( StateBorn = State("born") StateActive = State("active") StateStopped = State("stopped") )
Variables ¶
This section is empty.
Functions ¶
func RegisterHooks ¶
Types ¶
type ActiveProcess ¶
type Config ¶
type Config struct {
Network json.RawMessage `json:"network"`
}
type Container ¶
type Container interface {
ID() string
HasProperties(garden.Properties) bool
GraceTime() time.Duration
Start() error
Snapshot(io.Writer) error
ResourceSpec() LinuxContainerSpec
Restore(LinuxContainerSpec) error
Cleanup() error
LimitDisk(limits garden.DiskLimits) error
garden.Container
}
type ContainerProvider ¶
type ContainerProvider interface {
ProvideContainer(LinuxContainerSpec) Container
}
type ContainerRepository ¶
type FailedToSnapshotError ¶
type FailedToSnapshotError struct {
OriginalError error
}
func (FailedToSnapshotError) Error ¶
func (e FailedToSnapshotError) Error() string
type HandleExistsError ¶
type HandleExistsError struct {
Handle string
}
func (HandleExistsError) Error ¶
func (e HandleExistsError) Error() string
type HealthChecker ¶
type HealthChecker interface {
HealthCheck() error
}
type Limits ¶
type Limits struct {
Memory *garden.MemoryLimits
Disk *garden.DiskLimits
Bandwidth *garden.BandwidthLimits
CPU *garden.CPULimits
}
type LinuxBackend ¶
type LinuxBackend struct {
// contains filtered or unexported fields
}
func New ¶
func New( logger lager.Logger, resourcePool ResourcePool, containerRepo ContainerRepository, containerProvider ContainerProvider, systemInfo sysinfo.Provider, healthCheck HealthChecker, snapshotsPath string, maxContainers int, ) *LinuxBackend
func (*LinuxBackend) ApplyLimits ¶
func (b *LinuxBackend) ApplyLimits(container Container, limits garden.Limits) error
func (*LinuxBackend) BulkInfo ¶
func (b *LinuxBackend) BulkInfo(handles []string) (map[string]garden.ContainerInfoEntry, error)
func (*LinuxBackend) BulkMetrics ¶
func (b *LinuxBackend) BulkMetrics(handles []string) (map[string]garden.ContainerMetricsEntry, error)
func (*LinuxBackend) Containers ¶
func (b *LinuxBackend) Containers(props garden.Properties) ([]garden.Container, error)
func (*LinuxBackend) Create ¶
func (b *LinuxBackend) Create(spec garden.ContainerSpec) (garden.Container, error)
func (*LinuxBackend) Destroy ¶
func (b *LinuxBackend) Destroy(handle string) error
func (*LinuxBackend) GraceTime ¶
func (b *LinuxBackend) GraceTime(container garden.Container) time.Duration
func (*LinuxBackend) Lookup ¶
func (b *LinuxBackend) Lookup(handle string) (garden.Container, error)
func (*LinuxBackend) Ping ¶
func (b *LinuxBackend) Ping() error
func (*LinuxBackend) Setup ¶
func (b *LinuxBackend) Setup() error
func (*LinuxBackend) Start ¶
func (b *LinuxBackend) Start() error
func (*LinuxBackend) Stop ¶
func (b *LinuxBackend) Stop()
type LinuxContainerSpec ¶
type LinuxContainerSpec struct {
ID string
ContainerPath string
ContainerRootFSPath string
Resources *Resources
State State
Events []string
garden.ContainerSpec
Limits Limits
Processes []ActiveProcess
DefaultProcessSignaller bool
NetIns []NetInSpec
NetOuts []garden.NetOutRule
Version semver.Version
}
type MaxContainersReachedError ¶
type MaxContainersReachedError struct {
MaxContainers int
}
func (MaxContainersReachedError) Error ¶
func (e MaxContainersReachedError) Error() string
type ResourcePool ¶
type ResourcePool interface {
Setup() error
Acquire(garden.ContainerSpec) (LinuxContainerSpec, error)
Restore(io.Reader) (LinuxContainerSpec, error)
Release(LinuxContainerSpec) error
Prune(keep map[string]bool) error
MaxContainers() int
}
type Resources ¶
type Resources struct {
RootUID int
Network *Network
Bridge string
Ports []uint32
ExternalIP net.IP
// contains filtered or unexported fields
}
func NewResources ¶
type RootFSCleaner ¶
type RootFSCleaner struct {
FilePaths []string
}
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 |
Click to show internal directories.
Click to hide internal directories.