jobserver

package module
v0.0.0-...-10a1ecf Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2016 License: BSD-3-Clause Imports: 9 Imported by: 1

README

jobserver

GoDoc

Overview

This is a job queue that uses SQLite as its backend. It's specifically designed to do what I want, and probably isn't in line with what you want. Please do go ahead and use it though, if you like it!

License

3-clause BSD. A copy is included with the source.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTimeout  = errors.New("timed out")
	ErrNoJobs   = errors.New("no jobs")
	ErrNotFound = errors.New("not found")
)

Functions

This section is empty.

Types

type Client

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

func Dial

func Dial(addr string) (*Client, error)

func (*Client) Delete

func (c *Client) Delete(queue, id string) error

func (*Client) Peek

func (c *Client) Peek(queue string) (*Job, error)

func (*Client) Ping

func (c *Client) Ping() (time.Duration, error)

func (*Client) Put

func (c *Client) Put(queue, id, content string, priority float64, holdUntil time.Time, ttr time.Duration) error

func (*Client) Reserve

func (c *Client) Reserve(queue string) (*Job, error)

func (*Client) ReserveWait

func (c *Client) ReserveWait(queue string) (*Job, error)

func (*Client) SetRetries

func (c *Client) SetRetries(n int)

func (*Client) SetTimeout

func (c *Client) SetTimeout(t time.Duration)

type ErrUnhandledType

type ErrUnhandledType error

type Job

type Job struct {
	ID        string
	Queue     string
	Priority  float64
	HoldUntil time.Time
	TTR       time.Duration
	Content   string
}

Directories

Path Synopsis
Godeps
_workspace/src/github.com/Sirupsen/logrus
Package logrus is a structured logger for Go, completely API compatible with the standard library logger.
Package logrus is a structured logger for Go, completely API compatible with the standard library logger.
_workspace/src/github.com/alecthomas/template
Package template implements data-driven templates for generating textual output.
Package template implements data-driven templates for generating textual output.
_workspace/src/github.com/alecthomas/template/parse
Package parse builds parse trees for templates as defined by text/template and html/template.
Package parse builds parse trees for templates as defined by text/template and html/template.
_workspace/src/github.com/alecthomas/units
Package units provides helpful unit multipliers and functions for Go.
Package units provides helpful unit multipliers and functions for Go.
_workspace/src/github.com/kr/logfmt
Package implements the decoding of logfmt key-value pairs.
Package implements the decoding of logfmt key-value pairs.
_workspace/src/github.com/mattn/go-sqlite3
Package sqlite3 provides interface to SQLite3 databases.
Package sqlite3 provides interface to SQLite3 databases.
_workspace/src/gopkg.in/alecthomas/kingpin.v2
Package kingpin provides command line interfaces like this: $ chat usage: chat [<flags>] <command> [<flags>] [<args> ...] Flags: --debug enable debug mode --help Show help.
Package kingpin provides command line interfaces like this: $ chat usage: chat [<flags>] <command> [<flags>] [<args> ...] Flags: --debug enable debug mode --help Show help.
_workspace/src/gopkg.in/alecthomas/kingpin.v2/examples/curl
A curl-like HTTP command-line client.
A curl-like HTTP command-line client.
cmd
internal

Jump to

Keyboard shortcuts

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