Documentation
¶
Index ¶
- Constants
- func IsNotExist(err error) bool
- type CommandRunner
- type RuncAdapter
- type RuncClient
- type RuncLifecycle
- func (j *RuncLifecycle) ListProcesses() ([]*models.Process, error)
- func (j *RuncLifecycle) OpenShell(cfg *config.BPMConfig, stdin io.Reader, stdout, stderr io.Writer) error
- func (j *RuncLifecycle) RemoveProcess(logger lager.Logger, cfg *config.BPMConfig) error
- func (j *RuncLifecycle) RunProcess(logger lager.Logger, bpmCfg *config.BPMConfig, procCfg *config.ProcessConfig) (int, error)
- func (j *RuncLifecycle) StartProcess(logger lager.Logger, bpmCfg *config.BPMConfig, procCfg *config.ProcessConfig) error
- func (j *RuncLifecycle) StatProcess(cfg *config.BPMConfig) (*models.Process, error)
- func (j *RuncLifecycle) StopProcess(logger lager.Logger, cfg *config.BPMConfig, exitTimeout time.Duration) error
- type UserFinder
Constants ¶
View Source
const ( ContainerSigQuitGracePeriod = 2 * time.Second ContainerStatePollInterval = 1 * time.Second ContainerStateRunning = "running" ContainerStatePaused = "paused" ContainerStateStopped = "stopped" )
Variables ¶
This section is empty.
Functions ¶
func IsNotExist ¶ added in v0.6.0
Types ¶
type CommandRunner ¶
func NewCommandRunner ¶
func NewCommandRunner() CommandRunner
type RuncAdapter ¶
type RuncClient ¶
type RuncClient interface { CreateBundle(bundlePath string, jobSpec specs.Spec, user specs.User) error RunContainer(pidFilePath, bundlePath, containerID string, detach bool, stdout, stderr io.Writer) (int, error) Exec(containerID, command string, stdin io.Reader, stdout, stderr io.Writer) error ContainerState(containerID string) (*specs.State, error) ListContainers() ([]client.ContainerState, error) SignalContainer(containerID string, signal client.Signal) error DeleteContainer(containerID string) error DestroyBundle(bundlePath string) error }
type RuncLifecycle ¶
type RuncLifecycle struct {
// contains filtered or unexported fields
}
func NewRuncLifecycle ¶
func NewRuncLifecycle( runcClient RuncClient, runcAdapter RuncAdapter, userFinder UserFinder, commandRunner CommandRunner, clock clock.Clock, deleteFile func(string) error, ) *RuncLifecycle
func (*RuncLifecycle) ListProcesses ¶
func (j *RuncLifecycle) ListProcesses() ([]*models.Process, error)
func (*RuncLifecycle) RemoveProcess ¶
func (*RuncLifecycle) RunProcess ¶ added in v0.8.0
func (j *RuncLifecycle) RunProcess(logger lager.Logger, bpmCfg *config.BPMConfig, procCfg *config.ProcessConfig) (int, error)
func (*RuncLifecycle) StartProcess ¶
func (j *RuncLifecycle) StartProcess(logger lager.Logger, bpmCfg *config.BPMConfig, procCfg *config.ProcessConfig) error
func (*RuncLifecycle) StatProcess ¶ added in v0.6.0
func (*RuncLifecycle) StopProcess ¶
Click to show internal directories.
Click to hide internal directories.