Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
43 lines (34 sloc) 801 Bytes
package proc
import (
// Config is processor configuration.
type Config struct {
// NewConfig creates a default processor configuration.
func NewConfig() *Config {
return &Config{}
// Processor encapsulates a set of top-level business logic routines.
type Processor struct {
conf *Config
db *reform.DB
queue job.Queue
// NewProcessor creates a new processor.
func NewProcessor(
conf *Config, db *reform.DB, queue job.Queue) *Processor {
return &Processor{
conf: conf,
db: db,
queue: queue,
// Processor-specific errors.
var (
ErrBadServiceStatus = errors.New("bad service status")
ErrActiveJobsExist = errors.New("active jobs exist")
ErrSameJobExists = errors.New("same job exists")
You can’t perform that action at this time.