proc

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2020 License: GPL-3.0 Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBadServiceStatus = errors.New("bad service status")
	ErrActiveJobsExist  = errors.New("active jobs exist")
	ErrSameJobExists    = errors.New("same job exists")
)

Processor-specific errors.

Functions

This section is empty.

Types

type Config

type Config struct {
}

Config is processor configuration.

func NewConfig

func NewConfig() *Config

NewConfig creates a default processor configuration.

type Processor

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

Processor encapsulates a set of top-level business logic routines.

func NewProcessor

func NewProcessor(
	conf *Config, db *reform.DB, queue job.Queue) *Processor

NewProcessor creates a new processor.

func (*Processor) ActivateChannel

func (p *Processor) ActivateChannel(id, jobCreator string,
	agent bool) (string, error)

ActivateChannel tries to activate a given channel.

func (*Processor) SuspendChannel

func (p *Processor) SuspendChannel(id, jobCreator string,
	agent bool) (string, error)

SuspendChannel tries to suspend a given channel.

func (*Processor) TerminateChannel

func (p *Processor) TerminateChannel(id, jobCreator string,
	agent bool) (string, error)

TerminateChannel tries to terminate a given channel.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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