Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( StateCreated = State("created") StateRunning = State("running") StateCanceling = State("canceling") StateSucceeded = State("succeeded") StateFailed = State("failed") StateCanceled = State("canceled") )
View Source
var (
ContextKeyParams = contextKey("_job_params")
)
Functions ¶
Types ¶
type Job ¶
type Job interface {
ID() string
Labels() labels.Set
CreatedAt() time.Time
StartedAt() time.Time
EndedAt() time.Time
State() State
Context() context.Context
Progress() float64
Err() error
Result() any
Start(ctx context.Context) bool
ExecutionTime() time.Duration
Wait()
Cancel() bool
IsExecuting() bool
IsDone() bool
IsState(state State) bool
Stats() *Stats
}
Click to show internal directories.
Click to hide internal directories.