Documentation ¶
Index ¶
- Constants
- func NewLogRunner(runner commandrunner.CommandRunner, logFileGenerator generateLogFileFunc) *logRunner
- func UnixEnvFor(bndl goci.Bndl, spec ProcessSpec) []string
- func WindowsEnvFor(bndl goci.Bndl, spec ProcessSpec) []string
- type BundleLoader
- type Creator
- type Deleter
- type EnvDeterminer
- type EnvFunc
- type EventsNotifier
- type ExecRunner
- type ExecUser
- type Execer
- type Killer
- type LogDir
- type LoggingCmd
- type LookupFunc
- type Mkdirer
- type OomWatcher
- type PreparedSpec
- type ProcBuilder
- type ProcessBuilder
- type ProcessSpec
- type RunRunc
- type RuncBinary
- type RuncCmdRunner
- type Runner
- type State
- type Stater
- type StatsNotifier
- type Statser
- type Status
- type UidGenerator
- type UserLookupper
- type WaitWatcher
- type Waiter
- type Watcher
Constants ¶
View Source
const ( DefaultUID int = 0 DefaultGID int = 0 DefaultHome string = "/root" )
View Source
const DefaultPath = "PATH=/usr/local/bin:/usr/bin:/bin"
View Source
const DefaultRootPath = "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
Variables ¶
This section is empty.
Functions ¶
func NewLogRunner ¶
func NewLogRunner(runner commandrunner.CommandRunner, logFileGenerator generateLogFileFunc) *logRunner
func UnixEnvFor ¶
func UnixEnvFor(bndl goci.Bndl, spec ProcessSpec) []string
func WindowsEnvFor ¶
func WindowsEnvFor(bndl goci.Bndl, spec ProcessSpec) []string
Types ¶
type Creator ¶
type Creator struct {
// contains filtered or unexported fields
}
func NewCreator ¶
func NewCreator(runcPath string, runcExtraArgs []string, commandRunner commandrunner.CommandRunner) *Creator
type Deleter ¶
type Deleter struct {
// contains filtered or unexported fields
}
func NewDeleter ¶
func NewDeleter(runner RuncCmdRunner, runc RuncBinary) *Deleter
type EnvDeterminer ¶
type EnvDeterminer interface {
EnvFor(bndl goci.Bndl, spec ProcessSpec) []string
}
type EventsNotifier ¶
type ExecRunner ¶
type ExecRunner interface { Run( log lager.Logger, processID, processPath, sandboxHandle, sandboxBundlePath string, containerRootHostUID, containerRootHostGID uint32, pio garden.ProcessIO, tty bool, procJSON io.Reader, extraCleanup func() error, ) (garden.Process, error) Attach(log lager.Logger, processID string, io garden.ProcessIO, processesPath string) (garden.Process, error) }
type ExecUser ¶
func LookupUser ¶
type Execer ¶
type Execer struct {
// contains filtered or unexported fields
}
func NewExecer ¶
func NewExecer(bundleLoader BundleLoader, processBuilder ProcessBuilder, mkdirer Mkdirer, userLookuper UserLookupper, runner ExecRunner, processIDGen UidGenerator) *Execer
type Killer ¶
type Killer struct {
// contains filtered or unexported fields
}
func NewKiller ¶
func NewKiller(runner RuncCmdRunner, runc RuncBinary) *Killer
type LoggingCmd ¶
type LookupFunc ¶
type OomWatcher ¶
type OomWatcher struct {
// contains filtered or unexported fields
}
func NewOomWatcher ¶
func NewOomWatcher(runner commandrunner.CommandRunner, runc RuncBinary) *OomWatcher
func (*OomWatcher) WatchEvents ¶
func (r *OomWatcher) WatchEvents(log lager.Logger, handle string, eventsNotifier EventsNotifier) error
type PreparedSpec ¶
type ProcBuilder ¶
type ProcBuilder struct {
// contains filtered or unexported fields
}
func NewProcessBuilder ¶
func NewProcessBuilder(envDeterminer EnvDeterminer, nonRootMaxCaps []string) *ProcBuilder
func (*ProcBuilder) BuildProcess ¶
func (p *ProcBuilder) BuildProcess(bndl goci.Bndl, spec ProcessSpec) *PreparedSpec
type ProcessBuilder ¶
type ProcessBuilder interface {
BuildProcess(bndl goci.Bndl, processSpec ProcessSpec) *PreparedSpec
}
type ProcessSpec ¶
type ProcessSpec struct { garden.ProcessSpec ContainerUID int ContainerGID int }
type RunRunc ¶
type RunRunc struct { *Execer *Creator *OomWatcher *Statser *Stater *Killer *Deleter // contains filtered or unexported fields }
da doo
func New ¶
func New( runner commandrunner.CommandRunner, runcCmdRunner RuncCmdRunner, runc RuncBinary, dadooPath, runcPath string, runcExtraArgs []string, bundleLoader BundleLoader, processBuilder ProcessBuilder, mkdirer Mkdirer, userLookuper UserLookupper, execRunner ExecRunner, uidGenerator UidGenerator, ) *RunRunc
type RuncBinary ¶
type RuncBinary interface { ExecCommand(id, processJSONPath, pidFilePath string) *exec.Cmd EventsCommand(id string) *exec.Cmd StateCommand(id, logFile string) *exec.Cmd StatsCommand(id, logFile string) *exec.Cmd KillCommand(id, signal, logFile string) *exec.Cmd DeleteCommand(id string, force bool, logFile string) *exec.Cmd }
type RuncCmdRunner ¶
type RuncCmdRunner interface {
RunAndLog(log lager.Logger, cmd LoggingCmd) error
}
type Stater ¶
type Stater struct {
// contains filtered or unexported fields
}
func NewStater ¶
func NewStater(runner RuncCmdRunner, runc RuncBinary) *Stater
type StatsNotifier ¶
type StatsNotifier interface {
OnStat(handle string, cpuStat garden.ContainerCPUStat, memoryStat garden.ContainerMemoryStat)
}
type Statser ¶
type Statser struct {
// contains filtered or unexported fields
}
func NewStatser ¶
func NewStatser(runner RuncCmdRunner, runc RuncBinary) *Statser
type Status ¶
type Status string
const CreatedStatus Status = "created"
const RunningStatus Status = "running"
const StoppedStatus Status = "stopped"
type UidGenerator ¶
type UidGenerator interface {
Generate() string
}
type UserLookupper ¶
type WaitWatcher ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.