mongo

package
v0.0.0-...-bfbd9d7 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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(addrs string, cred *mgo.Credential) *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