 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEnvBuilder ¶
func NewEnvBuilder(c Config) pool.EnvBuilder
NewEnvBuilder creates builder for linux container pools
Types ¶
type Cgroup ¶
type Cgroup interface {
	SetCpuset(string) error
	SetMemoryLimit(envexec.Size) error
	SetProcLimit(uint64) error
	SetCPURate(uint64) error // 1000 as 1
	CPUUsage() (time.Duration, error)
	CurrentMemory() (envexec.Size, error)
	MaxMemory() (envexec.Size, error)
	AddProc(int) error
	Reset() error
	Destroy() error
}
    Cgroup defines interface to limit and monitor resources consumption of a process
type CgroupBuilder ¶
CgroupBuilder builds cgroup for runner
type CgroupListPool ¶
type CgroupListPool struct {
	// contains filtered or unexported fields
}
    CgroupListPool implements cgroup pool
func (*CgroupListPool) Get ¶
func (w *CgroupListPool) Get() (Cgroup, error)
Get gets cgroup from pool, if pool is empty, creates new one
type CgroupPool ¶
CgroupPool implements pool of Cgroup
func NewCgroupListPool ¶
func NewCgroupListPool(builder CgroupBuilder, cfsPeriod time.Duration) CgroupPool
NewCgroupListPool creates new cgroup pool
func NewFakeCgroupPool ¶
func NewFakeCgroupPool(builder CgroupBuilder, cfsPeriod time.Duration) CgroupPool
NewFakeCgroupPool creates FakeCgroupPool
type Config ¶
type Config struct {
	Builder    EnvironmentBuilder
	CgroupPool CgroupPool
	WorkDir    string
	Seccomp    []syscall.SockFilter
	Cpuset     string
	CPURate    bool
}
    Config specifies configuration to build environment builder
type EnvironmentBuilder ¶
type EnvironmentBuilder interface {
	Build() (container.Environment, error)
}
    EnvironmentBuilder defines the abstract builder for container environment
type FakeCgroupPool ¶
type FakeCgroupPool struct {
	// contains filtered or unexported fields
}
    FakeCgroupPool implements cgroup pool but not actually do pool
 Click to show internal directories. 
   Click to hide internal directories.