mem

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package mem is a minimal reference implementation of backend.Interface suitable for use in tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Memory

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

Memory is an in-memory backend intended to be a reference implementation used for testing. It is not safe to use in production.

func New

func New() *Memory

func (*Memory) AckJobs

func (m *Memory) AckJobs(ctx context.Context, acks *resource.Acks) error

func (*Memory) BlockQueues added in v0.4.0

func (m *Memory) BlockQueues(ctx context.Context, queues []string) error

func (*Memory) DeleteJobUniqueArgs

func (m *Memory) DeleteJobUniqueArgs(ctx context.Context, ids, keys []string) error

func (*Memory) DeleteQueues added in v0.4.0

func (m *Memory) DeleteQueues(ctx context.Context, queues []string) error

func (*Memory) DequeueJobs

func (m *Memory) DequeueJobs(ctx context.Context, limit int, opts *resource.JobListParams) (*resource.Jobs, error)

func (*Memory) EnqueueJobs

func (m *Memory) EnqueueJobs(ctx context.Context, jobArgs *resource.Jobs) (*resource.Jobs, error)

func (*Memory) GetJobByID

func (m *Memory) GetJobByID(ctx context.Context, id string, opts *resource.GetByIDOpts) (*resource.Job, error)

func (*Memory) GetJobUniqueArgs

func (m *Memory) GetJobUniqueArgs(ctx context.Context, keys []string) ([]string, bool, error)

func (*Memory) GetQueue

func (m *Memory) GetQueue(ctx context.Context, name string, opts *resource.GetByIDOpts) (*resource.Queue, error)

func (*Memory) ListJobs

func (m *Memory) ListJobs(ctx context.Context, limit int, opts *resource.JobListParams) (*resource.Jobs, error)

func (*Memory) ListQueues

func (m *Memory) ListQueues(ctx context.Context, opts *resource.QueueListParams) (*resource.Queues, error)

func (*Memory) PauseQueues added in v0.4.0

func (m *Memory) PauseQueues(ctx context.Context, queues []string) error

func (*Memory) Ping

func (m *Memory) Ping(ctx context.Context) error

func (*Memory) Reset

func (m *Memory) Reset(ctx context.Context) error

func (*Memory) SaveQueue

func (m *Memory) SaveQueue(ctx context.Context, queue *resource.Queue) (*resource.Queue, error)

func (*Memory) SetJobUniqueArgs

func (m *Memory) SetJobUniqueArgs(ctx context.Context, ids, keys []string) error

func (*Memory) Stats

func (m *Memory) Stats(ctx context.Context, queue string) (*resource.Stats, error)

func (*Memory) UnblockQueues added in v0.4.0

func (m *Memory) UnblockQueues(ctx context.Context, queues []string) error

func (*Memory) UnpauseQueues added in v0.4.0

func (m *Memory) UnpauseQueues(ctx context.Context, queues []string) error

Jump to

Keyboard shortcuts

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