jobs

package
v0.0.0-...-49d3f61 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FAILED   = -1
	BUSY     = iota
	FINISHED = iota
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job struct {
	Id          string      `json:"job_id,omitempty"`
	Status      int         `json:"status,omitempty"`
	Options     interface{} `json:"options,omitempty"`
	Error       error       `json:"error,omitempty"`
	ErrorString string      `json:"error_message, omitempty"`
}

func New

func New(opts interface{}) *Job

type JobStorage

type JobStorage struct {
	Jobs map[string]Job
}

This is a very easy memory storage like solution, we might need something more durable at one point.

var Storage JobStorage

func (*JobStorage) Get

func (self *JobStorage) Get(jobId string) *Job

func (*JobStorage) Set

func (self *JobStorage) Set(jobId string, job *Job) error

Jump to

Keyboard shortcuts

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