Documentation ¶
Index ¶
- Constants
- func NewBackend(logger zerolog.Logger, cfg config.Config) (iface.Backend, error)
- type Backend
- func (b *Backend) AddTask(ctx context.Context, queueName string, spec task.TaskSpec) (*task.Task, error)
- func (b *Backend) CreateQueue(ctx context.Context, queueSpec taskqueue.TaskQueueSpec) (*taskqueue.TaskQueue, error)
- func (b *Backend) DeleteQueue(ctx context.Context, queueName string) error
- func (b *Backend) GetAllQueues(ctx context.Context) ([]*taskqueue.TaskQueue, error)
- func (b *Backend) GetAllTasks(ctx context.Context, queueName string) ([]*task.Task, error)
- func (b *Backend) GetAllWorkers(ctx context.Context, queueUID uuid.UUID) ([]*apiworker.Worker, error)
- func (b *Backend) GetCompletedTasks(ctx context.Context, queueName string) ([]*task.Task, error)
- func (b *Backend) GetDeadLetter(ctx context.Context, queueName string) ([]taskqueue.TaskToDeadletterError, error)
- func (b *Backend) GetFailedTasks(ctx context.Context, queueName string) ([]*task.Task, error)
- func (b *Backend) GetFailedWorkers(ctx context.Context, queueUID uuid.UUID) ([]*apiworker.Worker, error)
- func (b *Backend) GetLostWorker(ctx context.Context, queueUID uuid.UUID) ([]*apiworker.Worker, error)
- func (b *Backend) GetPendingTasks(ctx context.Context, queueName string) ([]*task.Task, error)
- func (b *Backend) GetProcessingTasks(ctx context.Context, queueName string) ([]*task.Task, error)
- func (b *Backend) GetQueueByName(ctx context.Context, queueName string) (*taskqueue.TaskQueue, error)
- func (b *Backend) GetReceivedTasks(ctx context.Context, queueName string) ([]*task.Task, error)
- func (b *Backend) GetRunningWorkers(ctx context.Context, queueUID uuid.UUID) ([]*apiworker.Worker, error)
- func (b *Backend) GetSucceededTasks(ctx context.Context, queueName string) ([]*task.Task, error)
- func (b *Backend) GetSucceededWorkers(ctx context.Context, queueUID uuid.UUID) ([]*apiworker.Worker, error)
- func (b *Backend) GetWorker(ctx context.Context, queueUID, workerUID uuid.UUID) (*apiworker.Worker, error)
- func (b *Backend) GetWorkersToSalvage(ctx context.Context, queueUID uuid.UUID) ([]*apiworker.Worker, error)
- func (b *Backend) NextTask(ctx context.Context, queueUID, workerUID uuid.UUID) (*task.Task, error)
- func (b *Backend) RecordFailure(ctx context.Context, queueUID, workerUID uuid.UUID, t *task.Task, ...) error
- func (b *Backend) RegisterWorker(ctx context.Context, queueUID uuid.UUID, workerSpec apiworker.WorkerSpec) (*apiworker.Worker, error)
- func (b *Backend) SalvageWorker(ctx context.Context, ...) (*apiworker.Worker, []*task.Task, error)
- func (b *Backend) SendWorkerHeartBeat(ctx context.Context, queueUID, workerUID uuid.UUID) (*apiworker.Worker, error)
- func (b *Backend) SetProcessing(ctx context.Context, queueUID, workerUID uuid.UUID, t *task.Task) error
- func (b *Backend) SetSucceeded(ctx context.Context, queueUID, workerUID uuid.UUID, t *task.Task, ...) error
- func (b *Backend) SetWorkerFailed(ctx context.Context, queueUID, workerUID uuid.UUID) (*apiworker.Worker, error)
- func (b *Backend) SetWorkerSucceeded(ctx context.Context, queueUID, workerUID uuid.UUID) (*apiworker.Worker, error)
- func (b *Backend) UpdateQueue(ctx context.Context, queueSpec taskqueue.TaskQueueSpec) (*taskqueue.TaskQueue, error)
Constants ¶
View Source
const ( KB = 1 << 10 PayloadMaxSizeInKB = 1 MessageMaxSizeInKB = 1 HistoryLengthMax = 10 MaxNameLength = 1024 )
View Source
const (
GlobalKeyPrefix = "_pftaskqueue:"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Backend ¶
type Backend struct { *common.Backend *config.RedisConfig }
func (*Backend) CreateQueue ¶
func (*Backend) DeleteQueue ¶
func (*Backend) GetAllQueues ¶
func (*Backend) GetAllTasks ¶
func (*Backend) GetAllWorkers ¶
func (*Backend) GetCompletedTasks ¶
func (*Backend) GetDeadLetter ¶
func (*Backend) GetFailedTasks ¶
func (*Backend) GetFailedWorkers ¶
func (*Backend) GetLostWorker ¶
func (*Backend) GetPendingTasks ¶
func (*Backend) GetProcessingTasks ¶ added in v0.3.4
func (*Backend) GetQueueByName ¶
func (*Backend) GetReceivedTasks ¶
func (*Backend) GetRunningWorkers ¶
func (*Backend) GetSucceededTasks ¶
func (*Backend) GetSucceededWorkers ¶
func (*Backend) GetWorkersToSalvage ¶
func (*Backend) RecordFailure ¶
func (*Backend) RegisterWorker ¶
func (*Backend) SalvageWorker ¶
func (*Backend) SendWorkerHeartBeat ¶
func (*Backend) SetProcessing ¶
func (*Backend) SetSucceeded ¶
func (*Backend) SetWorkerFailed ¶
func (*Backend) SetWorkerSucceeded ¶
func (*Backend) UpdateQueue ¶
Click to show internal directories.
Click to hide internal directories.