Documentation ¶
Index ¶
- Constants
- Variables
- func ReapChildren()
- type Api
- type BootJob
- func (job *BootJob) CreateAndOpenStdFile(jobConfig *config.BaseJobConfig) error
- func (job *BootJob) GetName() string
- func (job *BootJob) GetPhase() *JobPhase
- func (job *BootJob) IsControllable() bool
- func (job *BootJob) MarkForRestart()
- func (job *BootJob) Reset()
- func (job *BootJob) Run(ctx context.Context) error
- func (job *BootJob) Signal(sig os.Signal)
- func (job *BootJob) SignalAll(sig syscall.Signal)
- func (job *BootJob) StreamStdErr(ctx context.Context, outChan chan []byte, errChan chan error, follow bool, ...)
- func (job *BootJob) StreamStdOut(ctx context.Context, outChan chan []byte, errChan chan error, follow bool, ...)
- func (job *BootJob) StreamStdOutAndStdErr(ctx context.Context, outChan chan []byte, ...)
- type CommonJob
- func (job *CommonJob) CreateAndOpenStdFile(jobConfig *config.BaseJobConfig) error
- func (job *CommonJob) GetName() string
- func (job *CommonJob) GetPhase() *JobPhase
- func (job *CommonJob) Init()
- func (job *CommonJob) IsControllable() bool
- func (job *CommonJob) IsRunning() bool
- func (job *CommonJob) MarkForRestart()
- func (job *CommonJob) Reset()
- func (job *CommonJob) Restart()
- func (job *CommonJob) Run(ctx context.Context, _ chan<- error) error
- func (job *CommonJob) Signal(sig os.Signal)
- func (job *CommonJob) SignalAll(sig syscall.Signal)
- func (job *CommonJob) Status() *CommonJobStatus
- func (job *CommonJob) Stop()
- func (job *CommonJob) StreamStdErr(ctx context.Context, outChan chan []byte, errChan chan error, follow bool, ...)
- func (job *CommonJob) StreamStdOut(ctx context.Context, outChan chan []byte, errChan chan error, follow bool, ...)
- func (job *CommonJob) StreamStdOutAndStdErr(ctx context.Context, outChan chan []byte, ...)
- func (job *CommonJob) Watch()
- type CommonJobStatus
- type Job
- type JobPhase
- type JobPhaseReason
- type LazyJob
- func (job *LazyJob) AssertStarted(ctx context.Context) error
- func (job *LazyJob) CreateAndOpenStdFile(jobConfig *config.BaseJobConfig) error
- func (job *LazyJob) GetName() string
- func (job *LazyJob) GetPhase() *JobPhase
- func (job *LazyJob) IsControllable() bool
- func (job *LazyJob) MarkForRestart()
- func (job *LazyJob) Reset()
- func (job *LazyJob) Run(ctx context.Context, errors chan<- error) error
- func (job *LazyJob) Signal(sig os.Signal)
- func (job *LazyJob) SignalAll(sig syscall.Signal)
- func (job *LazyJob) StreamStdErr(ctx context.Context, outChan chan []byte, errChan chan error, follow bool, ...)
- func (job *LazyJob) StreamStdOut(ctx context.Context, outChan chan []byte, errChan chan error, follow bool, ...)
- func (job *LazyJob) StreamStdOutAndStdErr(ctx context.Context, outChan chan []byte, ...)
- type Listener
- type Runner
Constants ¶
View Source
const (
ShutdownWaitingTimeSeconds = 10
)
Variables ¶
View Source
var ( ProcessWillBeRestartedError = errors.New("process will be restarted") ProcessWillBeStoppedError = errors.New("process will be stopped") )
Functions ¶
func ReapChildren ¶ added in v1.7.0
func ReapChildren()
Types ¶
type Api ¶ added in v1.8.0
type Api struct {
// contains filtered or unexported fields
}
func (*Api) RegisterHandler ¶ added in v1.8.0
func (*Api) RegisterMiddlewareFuncs ¶ added in v1.8.0
func (api *Api) RegisterMiddlewareFuncs(middlewareFunc ...mux.MiddlewareFunc)
type BootJob ¶ added in v1.6.0
type BootJob struct { Config *config.BootJobConfig // contains filtered or unexported fields }
func NewBootJob ¶ added in v1.6.0
func NewBootJob(c *config.BootJobConfig) (*BootJob, error)
func (*BootJob) CreateAndOpenStdFile ¶ added in v1.9.7
func (job *BootJob) CreateAndOpenStdFile(jobConfig *config.BaseJobConfig) error
func (*BootJob) IsControllable ¶ added in v1.8.0
func (job *BootJob) IsControllable() bool
func (*BootJob) MarkForRestart ¶ added in v1.7.8
func (job *BootJob) MarkForRestart()
func (*BootJob) StreamStdErr ¶ added in v1.8.1
func (*BootJob) StreamStdOut ¶ added in v1.8.1
type CommonJob ¶ added in v1.7.0
func (*CommonJob) CreateAndOpenStdFile ¶ added in v1.9.7
func (job *CommonJob) CreateAndOpenStdFile(jobConfig *config.BaseJobConfig) error
func (*CommonJob) IsControllable ¶ added in v1.8.0
func (job *CommonJob) IsControllable() bool
func (*CommonJob) MarkForRestart ¶ added in v1.7.8
func (job *CommonJob) MarkForRestart()
func (*CommonJob) Status ¶ added in v1.8.0
func (job *CommonJob) Status() *CommonJobStatus
func (*CommonJob) StreamStdErr ¶ added in v1.8.1
func (*CommonJob) StreamStdOut ¶ added in v1.8.1
func (*CommonJob) StreamStdOutAndStdErr ¶ added in v1.8.1
type CommonJobStatus ¶ added in v1.8.0
type JobPhase ¶ added in v1.9.0
type JobPhase struct { Reason JobPhaseReason `json:"reason"` LastChange time.Time `json:"lastChange"` }
func (*JobPhase) Is ¶ added in v1.9.2
func (p *JobPhase) Is(reason JobPhaseReason) bool
func (*JobPhase) Set ¶ added in v1.9.0
func (p *JobPhase) Set(reason JobPhaseReason)
type JobPhaseReason ¶ added in v1.9.0
type JobPhaseReason string
const ( JobPhaseReasonUnknown JobPhaseReason = "unknown" JobPhaseReasonAwaitingReadiness JobPhaseReason = "awaitingReadiness" JobPhaseReasonAwaitingConnection JobPhaseReason = "awaitingConnection" JobPhaseReasonStarted JobPhaseReason = "started" JobPhaseReasonStopped JobPhaseReason = "stopped" JobPhaseReasonCompleted JobPhaseReason = "completed" JobPhaseReasonFailed JobPhaseReason = "failed" JobPhaseReasonCrashLooping JobPhaseReason = "crashLooping" )
type LazyJob ¶ added in v1.7.0
type LazyJob struct { CommonJob // contains filtered or unexported fields }
func (*LazyJob) AssertStarted ¶ added in v1.7.0
func (*LazyJob) CreateAndOpenStdFile ¶ added in v1.9.7
func (job *LazyJob) CreateAndOpenStdFile(jobConfig *config.BaseJobConfig) error
func (*LazyJob) IsControllable ¶ added in v1.8.0
func (job *LazyJob) IsControllable() bool
func (*LazyJob) MarkForRestart ¶ added in v1.7.8
func (job *LazyJob) MarkForRestart()
func (*LazyJob) StreamStdErr ¶ added in v1.8.1
func (*LazyJob) StreamStdOut ¶ added in v1.8.1
type Listener ¶ added in v1.4.0
type Listener struct {
// contains filtered or unexported fields
}
func NewListener ¶ added in v1.4.0
Click to show internal directories.
Click to hide internal directories.