Documentation ¶
Index ¶
- func NewLogRunner(runner commandrunner.CommandRunner, logFileGenerator generateLogFileFunc) *logRunner
- type BundleLoader
- type BundleManager
- func (i *BundleManager) BundleInfo(log lager.Logger, handle string) (string, goci.Bndl, error)
- func (i *BundleManager) ContainerHandles() ([]string, error)
- func (i *BundleManager) ContainerPeaHandles(log lager.Logger, sandboxHandle string) ([]string, error)
- func (i *BundleManager) RemoveBundle(log lager.Logger, handle string) error
- type Creator
- type Depot
- type EventsWatcher
- type ExecRunner
- type Execer
- func (e *Execer) Attach(log lager.Logger, id, processID string, io garden.ProcessIO) (garden.Process, error)
- func (e *Execer) Exec(log lager.Logger, sandboxHandle string, spec garden.ProcessSpec, ...) (garden.Process, error)
- func (e *Execer) ExecWithBndl(log lager.Logger, sandboxHandle string, bundle goci.Bndl, ...) (garden.Process, error)
- type LogDir
- type LoggingCmd
- type Mkdirer
- type OomWatcher
- type PidGetter
- type ProcessBuilder
- type ProcessDepot
- type RunRunc
- type RuncBinary
- type RuncCmdRunner
- type RuncDeleter
- type Runner
- type Stater
- type StatsNotifier
- type Statser
- type UidGenerator
- type WaitWatcher
- type Waiter
- type Watcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLogRunner ¶
func NewLogRunner(runner commandrunner.CommandRunner, logFileGenerator generateLogFileFunc) *logRunner
Types ¶
type BundleLoader ¶
type BundleManager ¶
type BundleManager struct {
// contains filtered or unexported fields
}
func NewBundleManager ¶
func NewBundleManager(depot Depot, processDepot ProcessDepot) *BundleManager
func (*BundleManager) BundleInfo ¶
func (*BundleManager) ContainerHandles ¶
func (i *BundleManager) ContainerHandles() ([]string, error)
func (*BundleManager) ContainerPeaHandles ¶
func (i *BundleManager) ContainerPeaHandles(log lager.Logger, sandboxHandle string) ([]string, error)
func (*BundleManager) RemoveBundle ¶
func (i *BundleManager) RemoveBundle(log lager.Logger, handle string) error
type Creator ¶
type Creator struct {
// contains filtered or unexported fields
}
func NewCreator ¶
func NewCreator( runc RuncBinary, runcExtraArgs []string, commandRunner commandrunner.CommandRunner, eventsWatcher EventsWatcher, depot Depot, ) *Creator
type Depot ¶
type Depot interface { Create(log lager.Logger, handle string, bundle goci.Bndl) (string, error) CreatedTime(log lager.Logger, handle string) (time.Time, error) Lookup(log lager.Logger, handle string) (path string, err error) Load(log lager.Logger, handle string) (bundle goci.Bndl, err error) Handles() ([]string, error) Destroy(log lager.Logger, handle string) error }
type EventsWatcher ¶
type ExecRunner ¶
type ExecRunner interface { Run( log lager.Logger, processID, sandboxHandle string, pio garden.ProcessIO, tty bool, procJSON io.Reader, extraCleanup func() error, ) (garden.Process, error) RunPea( log lager.Logger, processID string, bundle goci.Bndl, sandboxHandle string, pio garden.ProcessIO, tty bool, procJSON io.Reader, extraCleanup func() error, ) (garden.Process, error) Attach(log lager.Logger, sandboxHandle, processID string, io garden.ProcessIO) (garden.Process, error) }
type Execer ¶
type Execer struct {
// contains filtered or unexported fields
}
func NewExecer ¶
func NewExecer(bundleLoader BundleLoader, processBuilder ProcessBuilder, mkdirer Mkdirer, userLookupper users.UserLookupper, execRunner ExecRunner, pidGetter PidGetter) *Execer
func (*Execer) Attach ¶
func (e *Execer) Attach(log lager.Logger, id, processID string, io garden.ProcessIO) (garden.Process, error)
Attach attaches to an already running process by guid
type LoggingCmd ¶
type OomWatcher ¶
type OomWatcher struct {
// contains filtered or unexported fields
}
func NewOomWatcher ¶
func NewOomWatcher(runner commandrunner.CommandRunner, runc RuncBinary) *OomWatcher
func (*OomWatcher) Events ¶
func (r *OomWatcher) Events(log lager.Logger) (<-chan event.Event, error)
func (*OomWatcher) WatchEvents ¶
func (r *OomWatcher) WatchEvents(log lager.Logger, handle string) error
type ProcessBuilder ¶
type ProcessDepot ¶
type RunRunc ¶
type RunRunc struct { *Creator *Execer *OomWatcher *Statser *Stater *deleter.Deleter *BundleManager }
da doo
type RuncBinary ¶
type RuncBinary interface { RunCommand(bundlePath, pidfilePath, logfilePath, id string, extraGlobalArgs []string) *exec.Cmd ExecCommand(id, processJSONPath, pidFilePath string) *exec.Cmd EventsCommand(id string) *exec.Cmd StateCommand(id, logFile string) *exec.Cmd StatsCommand(id, 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 RuncDeleter ¶
type RuncDeleter struct {
// contains filtered or unexported fields
}
func NewDeleter ¶
func NewDeleter(runner RuncCmdRunner, runc RuncBinary) *RuncDeleter
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, depot Depot, processDepot ProcessDepot) *Statser
type UidGenerator ¶
type UidGenerator interface {
Generate() string
}
type WaitWatcher ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.