Documentation ¶
Index ¶
- type Storage
- func (s *Storage) Ack(ctx context.Context, task *task.Task) error
- func (s *Storage) AckGroupTasks(ctx context.Context, group *tasklist.Group) error
- func (s *Storage) AckList(ctx context.Context, taskList *tasklist.TaskList) error
- func (s *Storage) Add(ctx context.Context, task *task.Task) error
- func (s *Storage) AddTaskList(ctx context.Context, taskList *tasklist.TaskList, tasks []*task.Task) error
- func (s *Storage) GetGroupTasks(ctx context.Context, group *tasklist.Group) ([]*task.Task, error)
- func (s *Storage) Poll(ctx context.Context) (*task.Task, error)
- func (s *Storage) PollList(ctx context.Context) (*tasklist.TaskList, error)
- func (s *Storage) SaveTaskHistory(ctx context.Context, task *task.Task) error
- func (s *Storage) SaveTaskListHistory(ctx context.Context, taskList *tasklist.TaskList) error
- func (s *Storage) Task(ctx context.Context, taskID string) (*task.Task, error)
- func (s *Storage) TaskHistory(ctx context.Context, taskID string) (*task.Task, error)
- func (s *Storage) TaskList(ctx context.Context, taskListID string) (*tasklist.TaskList, error)
- func (s *Storage) TaskListHistory(ctx context.Context, taskListID string) (*tasklist.TaskList, error)
- func (s *Storage) TaskListTemplate(ctx context.Context, taskListName string) (*tasklist.Template, error)
- func (s *Storage) TaskTemplate(ctx context.Context, taskName string) (*task.Task, error)
- func (s *Storage) TaskTemplates(ctx context.Context, names []string) (map[string]*task.Task, error)
- func (s *Storage) Unack(ctx context.Context, t *task.Task) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func (*Storage) AckGroupTasks ¶
AckGroupTasks removes tasks from tasks collection by groupID
func (*Storage) AddTaskList ¶
func (*Storage) GetGroupTasks ¶
GetGroupTasks fetches all tasks by a groupID
func (*Storage) Poll ¶
Poll retrieves one task with empty groupID from the tasks collection with the older ones being retrieved first (FIFO). It updates the state of the task to "pending", so that consequent calls to Poll would not retrieve the same task.
func (*Storage) PollList ¶
PollList retrieves one taskList from the taskLists collection with the older ones being retrieved first (FIFO). It updates the state of the task to "pending", so that consequent calls to PollList would not retrieve the same task.
func (*Storage) SaveTaskHistory ¶
SaveTaskHistory saves a task to the `tasksHistory` collection.
func (*Storage) SaveTaskListHistory ¶
SaveTaskListHistory adds a tasklist to the taskListHistory collection
func (*Storage) TaskHistory ¶
func (*Storage) TaskListHistory ¶
func (s *Storage) TaskListHistory(ctx context.Context, taskListID string) (*tasklist.TaskList, error)
TaskListHistory retrieves a tasklist.TaskList from taskListHistory collection by ID
func (*Storage) TaskListTemplate ¶
func (s *Storage) TaskListTemplate(ctx context.Context, taskListName string) (*tasklist.Template, error)
TaskListTemplate retrieves one taskList definition by name from storage
func (*Storage) TaskTemplate ¶
func (*Storage) TaskTemplates ¶
TaskTemplates retrieves task definitions from storage by names.
The result is a map where 'key' is the task name and 'value' is the task definition