disk

package
v0.0.0-...-eaa370e Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2015 License: MIT Imports: 12 Imported by: 2

Documentation

Index

Constants

View Source
const (
	DEFAULT_Disk = "my.db"
)

Variables

View Source
var (
	JOB_BUCKET = []byte("job_list")
)

Functions

func DiskFactory

func DiskFactory() worker.Worker

DiskFactory create and return a Disk worker

Types

type Disk

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

Disk a worker which writes jobs to a boltDisk

func (*Disk) ConfigStruct

func (d *Disk) ConfigStruct() interface{}

ConfigStruct return the config structure for the DiskWorker

func (*Disk) Init

func (d *Disk) Init(i interface{}) error

Init set the worker up for use

func (*Disk) Kill

func (d *Disk) Kill() error

Kill this is a noop as the job can't be interupted

func (*Disk) Recycle

func (d *Disk) Recycle()

Recycle get the worker ready for reuse

func (*Disk) Work

func (d *Disk) Work(j job.Job) *job.JobStats

Work write a job to disk using a bolt Disk

type DiskConfig

type DiskConfig struct {
	DB_Name string `json:"db_name" required:"true"`
	Bucket  string `json:"bucket" required:"true" description:"the bucket to insert jobs into"`
}

type DiskParams

type DiskParams struct {
	ExicutionTime int64           `json:"exicution_time"`
	Job           json.RawMessage `json:"job"`
}

Jump to

Keyboard shortcuts

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