Versions in this module Expand all Collapse all v0 v0.0.2 Nov 21, 2024 v0.0.1 Nov 21, 2024 Changes in this version + type Callback func() *TaskResponse + type Request struct + CompletedChannel chan *TaskResponse + CreatedAt time.Time + Ctx context.Context + ID string + ScheduledTime time.Time + Status string + Task *Task + func NewRequest(ctx context.Context, task *Task, scheduledTime time.Time) *Request + func (r *Request) IsCanceled() bool + func (r *Request) MarkCanceled() + func (r *Request) MarkComplete(resp *TaskResponse) + func (r *Request) Validate() error + type Task struct + Callback Callback + ID string + RetryCount int + Timeout time.Duration + func NewTask(id string, callback Callback) *Task + func (t *Task) MarshalJSON() ([]byte, error) + func (t *Task) UnmarshalJSON(data []byte) error + func (t *Task) Validate() error + func (t *Task) WithMilliSecondTimeout(d int) *Task + func (t *Task) WithRetry(count int) *Task + func (t *Task) WithSecondTimeout(d int) *Task + type TaskResponse struct + Data interface{} + Error error