Versions in this module Expand all Collapse all v0 v0.0.7 Mar 6, 2026 v0.0.6 Mar 5, 2026 Changes in this version + var ErrBusy = errors.New("a task is already running") + func ValidateCron(expr string) error + type Engine struct + func NewEngine(ctx context.Context, handlers map[TaskType]TaskHandler) *Engine + func (e *Engine) EvalSchedules() + func (e *Engine) GetResult(id string) *TaskResult + func (e *Engine) Healthz() bool + func (e *Engine) RecentResults() []TaskResult + func (e *Engine) RemoveResult(id string) bool + func (e *Engine) Status() StatusResponse + func (e *Engine) Submit(task Task) (string, error) + func (e *Engine) SubmitScheduled(task Task, sched Schedule) (string, error) + type Schedule struct + BlockHeight *int64 + Cron string + type StatusResponse struct + Status string + type Task struct + Params map[string]any + Type TaskType + type TaskHandler func(ctx context.Context, params map[string]any) error + type TaskResult struct + CompletedAt *time.Time + Error string + ID string + NextRunAt *time.Time + Params map[string]any + Schedule *Schedule + SubmittedAt time.Time + Type string + type TaskType string + const TaskConfigPatch + const TaskConfigureGenesis + const TaskConfigureStateSync + const TaskDiscoverPeers + const TaskMarkReady + const TaskSnapshotRestore + const TaskSnapshotUpload + const TaskUpdatePeers