Documentation ¶
Index ¶
- Constants
- type ContainerSnapshot
- type LimitsSnapshot
- type LinuxContainer
- func (c *LinuxContainer) Attach(processID uint32, processIO garden.ProcessIO) (garden.Process, error)
- func (c *LinuxContainer) Cleanup()
- func (c *LinuxContainer) CurrentBandwidthLimits() (garden.BandwidthLimits, error)
- func (c *LinuxContainer) CurrentCPULimits() (garden.CPULimits, error)
- func (c *LinuxContainer) CurrentDiskLimits() (garden.DiskLimits, error)
- func (c *LinuxContainer) CurrentEnvVars() process.Env
- func (c *LinuxContainer) CurrentMemoryLimits() (garden.MemoryLimits, error)
- func (c *LinuxContainer) Events() []string
- func (c *LinuxContainer) GraceTime() time.Duration
- func (c *LinuxContainer) Handle() string
- func (c *LinuxContainer) HasProperties(properties garden.Properties) bool
- func (c *LinuxContainer) ID() string
- func (c *LinuxContainer) Info() (garden.ContainerInfo, error)
- func (c *LinuxContainer) LimitBandwidth(limits garden.BandwidthLimits) error
- func (c *LinuxContainer) LimitCPU(limits garden.CPULimits) error
- func (c *LinuxContainer) LimitDisk(limits garden.DiskLimits) error
- func (c *LinuxContainer) LimitMemory(limits garden.MemoryLimits) error
- func (c *LinuxContainer) Metrics() (garden.Metrics, error)
- func (c *LinuxContainer) NetIn(hostPort uint32, containerPort uint32) (uint32, uint32, error)
- func (c *LinuxContainer) NetOut(r garden.NetOutRule) error
- func (c *LinuxContainer) Properties() (garden.Properties, error)
- func (c *LinuxContainer) Property(key string) (string, error)
- func (c *LinuxContainer) RemoveProperty(key string) error
- func (c *LinuxContainer) Resources() *linux_backend.Resources
- func (c *LinuxContainer) Restore(snapshot ContainerSnapshot) error
- func (c *LinuxContainer) Run(spec garden.ProcessSpec, processIO garden.ProcessIO) (garden.Process, error)
- func (c *LinuxContainer) SetProperty(key string, value string) error
- func (c *LinuxContainer) Snapshot(out io.Writer) error
- func (c *LinuxContainer) Start() error
- func (c *LinuxContainer) State() State
- func (c *LinuxContainer) Stop(kill bool) error
- func (c *LinuxContainer) StreamIn(dstPath string, tarStream io.Reader) error
- func (c *LinuxContainer) StreamOut(srcPath string) (io.ReadCloser, error)
- type NetInSpec
- type PortPool
- type ProcessIDPool
- type ProcessSnapshot
- type ResourcesSnapshot
- type State
- type UndefinedPropertyError
Constants ¶
View Source
const ( StateBorn = State("born") StateActive = State("active") StateStopped = State("stopped") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerSnapshot ¶
type ContainerSnapshot struct { ID string Handle string GraceTime time.Duration State string Events []string Limits LimitsSnapshot Resources ResourcesSnapshot Processes []ProcessSnapshot NetIns []NetInSpec NetOuts []garden.NetOutRule Properties garden.Properties EnvVars []string }
type LimitsSnapshot ¶
type LimitsSnapshot struct { Memory *garden.MemoryLimits Disk *garden.DiskLimits Bandwidth *garden.BandwidthLimits CPU *garden.CPULimits }
type LinuxContainer ¶
type LinuxContainer struct {
// contains filtered or unexported fields
}
func NewLinuxContainer ¶
func NewLinuxContainer( logger lager.Logger, id, handle, path string, properties garden.Properties, graceTime time.Duration, resources *linux_backend.Resources, portPool PortPool, runner command_runner.CommandRunner, cgroupsManager cgroups_manager.CgroupsManager, quotaManager quota_manager.QuotaManager, bandwidthManager bandwidth_manager.BandwidthManager, processTracker process_tracker.ProcessTracker, env process.Env, filter network.Filter, ) *LinuxContainer
func (*LinuxContainer) Cleanup ¶
func (c *LinuxContainer) Cleanup()
func (*LinuxContainer) CurrentBandwidthLimits ¶
func (c *LinuxContainer) CurrentBandwidthLimits() (garden.BandwidthLimits, error)
func (*LinuxContainer) CurrentCPULimits ¶
func (c *LinuxContainer) CurrentCPULimits() (garden.CPULimits, error)
func (*LinuxContainer) CurrentDiskLimits ¶
func (c *LinuxContainer) CurrentDiskLimits() (garden.DiskLimits, error)
func (*LinuxContainer) CurrentEnvVars ¶
func (c *LinuxContainer) CurrentEnvVars() process.Env
func (*LinuxContainer) CurrentMemoryLimits ¶
func (c *LinuxContainer) CurrentMemoryLimits() (garden.MemoryLimits, error)
func (*LinuxContainer) Events ¶
func (c *LinuxContainer) Events() []string
func (*LinuxContainer) GraceTime ¶
func (c *LinuxContainer) GraceTime() time.Duration
func (*LinuxContainer) Handle ¶
func (c *LinuxContainer) Handle() string
func (*LinuxContainer) HasProperties ¶
func (c *LinuxContainer) HasProperties(properties garden.Properties) bool
func (*LinuxContainer) ID ¶
func (c *LinuxContainer) ID() string
func (*LinuxContainer) Info ¶
func (c *LinuxContainer) Info() (garden.ContainerInfo, error)
func (*LinuxContainer) LimitBandwidth ¶
func (c *LinuxContainer) LimitBandwidth(limits garden.BandwidthLimits) error
func (*LinuxContainer) LimitDisk ¶
func (c *LinuxContainer) LimitDisk(limits garden.DiskLimits) error
func (*LinuxContainer) LimitMemory ¶
func (c *LinuxContainer) LimitMemory(limits garden.MemoryLimits) error
func (*LinuxContainer) NetOut ¶
func (c *LinuxContainer) NetOut(r garden.NetOutRule) error
func (*LinuxContainer) Properties ¶
func (c *LinuxContainer) Properties() (garden.Properties, error)
func (*LinuxContainer) RemoveProperty ¶
func (c *LinuxContainer) RemoveProperty(key string) error
func (*LinuxContainer) Resources ¶
func (c *LinuxContainer) Resources() *linux_backend.Resources
func (*LinuxContainer) Restore ¶
func (c *LinuxContainer) Restore(snapshot ContainerSnapshot) error
func (*LinuxContainer) Run ¶
func (c *LinuxContainer) Run(spec garden.ProcessSpec, processIO garden.ProcessIO) (garden.Process, error)
func (*LinuxContainer) SetProperty ¶
func (c *LinuxContainer) SetProperty(key string, value string) error
func (*LinuxContainer) Start ¶
func (c *LinuxContainer) Start() error
func (*LinuxContainer) State ¶
func (c *LinuxContainer) State() State
func (*LinuxContainer) Stop ¶
func (c *LinuxContainer) Stop(kill bool) error
func (*LinuxContainer) StreamIn ¶
func (c *LinuxContainer) StreamIn(dstPath string, tarStream io.Reader) error
func (*LinuxContainer) StreamOut ¶
func (c *LinuxContainer) StreamOut(srcPath string) (io.ReadCloser, error)
type ProcessIDPool ¶
type ProcessIDPool struct {
// contains filtered or unexported fields
}
func (*ProcessIDPool) Next ¶
func (p *ProcessIDPool) Next() uint32
func (*ProcessIDPool) Restore ¶
func (p *ProcessIDPool) Restore(id uint32)
type ProcessSnapshot ¶
type ResourcesSnapshot ¶
type UndefinedPropertyError ¶
type UndefinedPropertyError struct {
Key string
}
func (UndefinedPropertyError) Error ¶
func (err UndefinedPropertyError) Error() string
Click to show internal directories.
Click to hide internal directories.