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 ¶
go:generate counterfeiter . 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 (*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 }
go:generate counterfeiter . Depot
type EventsWatcher ¶
go:generate counterfeiter . 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) }
go:generate counterfeiter . ExecRunner
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 Mkdirer ¶
type Mkdirer interface {
MkdirAs(rootFSPathFile string, uid, gid int, mode os.FileMode, recreate bool, path ...string) error
}
go:generate counterfeiter . Mkdirer
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) error
type ProcessBuilder ¶
type ProcessBuilder interface {
BuildProcess(bndl goci.Bndl, processSpec garden.ProcessSpec, user *users.ExecUser) *specs.Process
}
go:generate counterfeiter . ProcessBuilder
type ProcessDepot ¶
type ProcessDepot interface { ListProcessDirs(log lager.Logger, sandboxHandle string) ([]string, error) CreatedTime(log lager.Logger, processID string) (time.Time, error) }
go:generate counterfeiter . 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 }
go:generate counterfeiter . RuncBinary
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)
}
go:generate counterfeiter . StatsNotifier
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
}
go:generate counterfeiter . UidGenerator
type WaitWatcher ¶
go:generate counterfeiter . WaitWatcher
Source Files
Directories
Path | Synopsis |
---|---|
pidfakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
Code generated by counterfeiter.
|
Code generated by counterfeiter. |