Documentation ¶
Overview ¶
Package jobexecutor package
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplyHandler ¶
type ApplyHandler struct {
// contains filtered or unexported fields
}
ApplyHandler handles an apply job
func NewApplyHandler ¶
func NewApplyHandler( cancellableCtx context.Context, jobCfg *JobConfig, workspaceDir string, workspace *types.Workspace, run *types.Run, logger logger.Logger, jobLogger joblogger.Logger, client jobclient.Client, ) *ApplyHandler
NewApplyHandler creates a new ApplyHandler
func (*ApplyHandler) Cleanup ¶ added in v0.28.0
func (a *ApplyHandler) Cleanup(ctx context.Context) error
Cleanup is called after the job has been executed
type JobConfig ¶
type JobConfig struct { JobID string APIEndpoint string JobToken string DiscoveryProtocolHost string }
JobConfig is used to configure the job
type JobExecutor ¶
type JobExecutor struct {
// contains filtered or unexported fields
}
JobExecutor executes a job
func NewJobExecutor ¶
func NewJobExecutor( cfg *JobConfig, client jobclient.Client, logger logger.Logger, version string, ) *JobExecutor
NewJobExecutor creates a new JobExecutor
type JobHandler ¶
type JobHandler interface { Execute(ctx context.Context) error OnError(ctx context.Context, err error) Cleanup(ctx context.Context) error }
JobHandler contains the job lifecycle functions
type MemoryMonitor ¶ added in v0.4.0
MemoryMonitor implements all memory monitor functions. The methods should be called in the order shown here. GetMaxMemoryUsage can be called multiple times if desired.
func NewMemoryMonitor ¶ added in v0.4.0
func NewMemoryMonitor(jobLogger joblogger.Logger, memoryLimit uint64) (MemoryMonitor, error)
NewMemoryMonitor creates an instance of the memory monitor.
type PlanHandler ¶
type PlanHandler struct {
// contains filtered or unexported fields
}
PlanHandler handles a plan job
func NewPlanHandler ¶
func NewPlanHandler( cancellableCtx context.Context, jobCfg *JobConfig, workspaceDir string, workspace *types.Workspace, run *types.Run, logger logger.Logger, jobLogger joblogger.Logger, client jobclient.Client, ) *PlanHandler
NewPlanHandler creates a new PlanHandler
func (*PlanHandler) Cleanup ¶ added in v0.28.0
func (p *PlanHandler) Cleanup(ctx context.Context) error
Cleanup is called after the job has been executed
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package jobclient package
|
Package jobclient package |
Package joblogger is used to handle job logs
|
Package joblogger is used to handle job logs |
Package managedidentity package
|
Package managedidentity package |
awsfederated
Package awsfederated package
|
Package awsfederated package |
azurefederated
Package azurefederated package
|
Package azurefederated package |
tharsisfederated
Package tharsisfederated package
|
Package tharsisfederated package |