Documentation ¶
Index ¶
Constants ¶
View Source
const ( // EventTypePreempted 抢占了一个任务 EventTypePreempted = "preempted" // EventTypeDeleted 某一个任务被删除了 EventTypeDeleted = "deleted" EventTypeCreated = "created" EventTypeRunnable = "runnable" EventTypeEnd = "end" EventTypeDiscarded = "discarded" Stop = "stop" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RefreshIntervalRetry ¶
type RefreshIntervalRetry struct { Interval time.Duration Max int64 // contains filtered or unexported fields }
func (*RefreshIntervalRetry) GetCntRetry ¶
func (r *RefreshIntervalRetry) GetCntRetry() int64
func (*RefreshIntervalRetry) GetMaxRetry ¶
func (r *RefreshIntervalRetry) GetMaxRetry() int64
type RetryStrategy ¶
type TaskDAO ¶
type TaskDAO interface { Get(ctx context.Context, taskId int64) (*task.Task, error) Add(ctx context.Context, t *task.Task) (int64, error) AddExecution(ctx context.Context, taskId int64) (int64, error) Update(ctx context.Context, t *task.Task) error CompareAndUpdateTaskStatus(ctx context.Context, taskId int64, old, new string) error CompareAndUpdateTaskExecutionStatus(ctx context.Context, taskId int64, old, new string) error Delete(ctx context.Context, taskId int64) error }
Click to show internal directories.
Click to hide internal directories.