redis

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 License: MIT Imports: 3 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// HashKey is the hash key where jobs are persisted.
	HashKey = "kala:jobs"
)

Functions

This section is empty.

Types

type DB

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

DB is concrete implementation of the JobDB interface, that uses Redis for persistence.

func New

func New(address string, password redis.DialOption, sendPassword bool) *DB

New instantiates a new DB.

func (DB) Close

func (d DB) Close() error

Close closes the connection to Redis.

func (DB) Delete

func (d DB) Delete(id string) error

Delete deletes a persisted Job.

func (DB) Get

func (d DB) Get(id string) (*job.Job, error)

Get returns a persisted Job.

func (DB) GetAll

func (d DB) GetAll() ([]*job.Job, error)

GetAll returns all persisted Jobs.

func (DB) Save

func (d DB) Save(j *job.Job) error

Save persists a Job.

Jump to

Keyboard shortcuts

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