view

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TaskView

type TaskView interface {
	Exists(ctx context.Context, taskID string) (bool, error)
	ByID(ctx context.Context, taskID string) (*domain.Task, error)
	NextInQueue(ctx context.Context, queue string) (*domain.Task, error)
	InQueue(ctx context.Context, queue string) ([]*domain.Task, error)
	QueueStats(ctx context.Context, queue string) (map[string][]string, error)
	TimedOut(ctx context.Context) ([]*domain.Task, error)
}

type TaskViewImpl

type TaskViewImpl struct {
	// contains filtered or unexported fields
}

func NewTaskView

func NewTaskView(redis *redis.Client) TaskViewImpl

func (TaskViewImpl) ByID

func (v TaskViewImpl) ByID(ctx context.Context, taskID string) (*domain.Task, error)

func (TaskViewImpl) Exists

func (v TaskViewImpl) Exists(ctx context.Context, taskID string) (bool, error)

func (TaskViewImpl) InQueue

func (v TaskViewImpl) InQueue(ctx context.Context, queue string) ([]*domain.Task, error)

func (TaskViewImpl) NextInQueue

func (v TaskViewImpl) NextInQueue(ctx context.Context, queue string) (*domain.Task, error)

func (TaskViewImpl) QueueStats added in v1.2.0

func (v TaskViewImpl) QueueStats(ctx context.Context, queue string) (map[string][]string, error)

func (TaskViewImpl) TimedOut

func (v TaskViewImpl) TimedOut(ctx context.Context) ([]*domain.Task, error)

type TaskViewLocker

type TaskViewLocker struct {
	// contains filtered or unexported fields
}

func NewTaskViewLocker

func NewTaskViewLocker(locker *redislock.Client, next TaskView) TaskViewLocker

func (TaskViewLocker) ByID

func (v TaskViewLocker) ByID(ctx context.Context, taskID string) (*domain.Task, error)

func (TaskViewLocker) Exists

func (v TaskViewLocker) Exists(ctx context.Context, taskID string) (bool, error)

func (TaskViewLocker) InQueue

func (v TaskViewLocker) InQueue(ctx context.Context, queue string) ([]*domain.Task, error)

func (TaskViewLocker) NextInQueue

func (v TaskViewLocker) NextInQueue(ctx context.Context, queue string) (*domain.Task, error)

func (TaskViewLocker) QueueStats added in v1.2.0

func (v TaskViewLocker) QueueStats(ctx context.Context, queue string) (map[string][]string, error)

func (TaskViewLocker) TimedOut

func (v TaskViewLocker) TimedOut(ctx context.Context) ([]*domain.Task, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL