Documentation ¶
Index ¶
- func AutorunCollector(ctx context.Context) error
- func GarbageCollector(ctx context.Context, completedTaskExpiration string) error
- func Init(ctx context.Context, wg *sync.WaitGroup, store *configstore.Store) error
- func InstanceCollector(ctx context.Context, maxConcurrentExecutions int, waitDuration time.Duration) error
- func RetryCollector(ctx context.Context) error
- type Engine
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutorunCollector ¶
AutorunCollector launches a process that looks for existing resolutions with state TO_AUTORUN, and passes them to the engine for execution
func GarbageCollector ¶
GarbageCollector launches a process that cleans up finished tasks (ie are in a final state) older than a given threshold
func Init ¶
Init launches the task orchestration engine, providing it with a global context and with a store from which to inherit configuration items needed for task execution
func InstanceCollector ¶
func InstanceCollector(ctx context.Context, maxConcurrentExecutions int, waitDuration time.Duration) error
InstanceCollector launches a process that retrieves resolutions which might have been running on a dead instance and marks them as crashed, for examination
func RetryCollector ¶
RetryCollector launches a process that collects all resolutions eligible for a new run and passes them to the engine for execution
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine is the heart of utask: it is the active process that handles the lifecycle of every task resolution. All the logic for resolution state changes is expressed here - the engine determines which steps in a resolution are eligible for execution, and which should be pruned - the engine computes step dependencies - the conditions expressed in a step (skip/check) that impact resolution state are enforced by the engine
func (Engine) SyncResolve ¶
func (e Engine) SyncResolve(publicID string, sm *semaphore.Weighted) (*resolution.Resolution, error)
SyncResolve launches the synchronous execution of a resolution, given its ID