Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Task ¶
type Task struct { Id uuid.UUID `json:"id"` Name string `json:"name"` Status TaskStatus `json:"status"` Details interface{} `json:"details,omitempty"` Error string `json:"error,omitempty"` EnqueuedAt time.Time `json:"enqueued_at,omitempty"` StartedAt time.Time `json:"started_at,omitempty"` FinishedAt time.Time `json:"finished_at,omitempty"` }
type TaskScheduler ¶
type TaskScheduler struct {
// contains filtered or unexported fields
}
func NewTaskScheduler ¶
func NewTaskScheduler(taskStorage Storer, logger logging.Logger) TaskScheduler
func (*TaskScheduler) ProcessTasks ¶
func (s *TaskScheduler) ProcessTasks()
func (*TaskScheduler) RegisterListener ¶
func (s *TaskScheduler) RegisterListener(taskName string, taskFunc TaskFunc)
type TaskStatus ¶
type TaskStatus string
const ( Enqueued TaskStatus = "enqueued" Processing TaskStatus = "processing" Finished TaskStatus = "finished" Canceled TaskStatus = "canceled" )
Click to show internal directories.
Click to hide internal directories.