model

package
v0.0.0-...-f1c7bc1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2021 License: MIT Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Logger  logger.Logger
	Storage storage.Storage
	BusCh   chan<- *message.Message
}

Config AFAIRE.

type Job

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

Job AFAIRE.

func (*Job) Category

func (job *Job) Category() *string

Category AFAIRE.

func (*Job) Config

func (job *Job) Config() map[string]interface{}

Config AFAIRE.

func (*Job) CreatedAt

func (job *Job) CreatedAt() time.Time

CreatedAt AFAIRE.

func (*Job) Data

func (job *Job) Data(key string) (interface{}, bool)

Data AFAIRE.

func (*Job) ID

func (job *Job) ID() string

ID AFAIRE.

func (*Job) Name

func (job *Job) Name() string

Name AFAIRE.

func (*Job) Namespace

func (job *Job) Namespace() string

Namespace AFAIRE.

func (*Job) Origin

func (job *Job) Origin() string

Origin AFAIRE.

func (*Job) Priority

func (job *Job) Priority() int

Priority AFAIRE.

func (*Job) Private

func (job *Job) Private(key string) (interface{}, bool)

Private AFAIRE.

func (*Job) Retries

func (job *Job) Retries() int

Retries AFAIRE.

func (*Job) RunAfter

func (job *Job) RunAfter() time.Time

RunAfter AFAIRE.

func (*Job) Type

func (job *Job) Type() string

Type AFAIRE.

func (*Job) Workflow

func (job *Job) Workflow() *string

Workflow AFAIRE.

type JobR

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

JobR AFAIRE.

func JobFailed

func JobFailed() *JobR

JobFailed AFAIRE.

func JobPending

func JobPending() *JobR

JobPending AFAIRE.

func JobSucceeded

func JobSucceeded() *JobR

JobSucceeded AFAIRE.

func (*JobR) SetDuration

func (r *JobR) SetDuration(duration time.Duration) *JobR

SetDuration AFAIRE.

func (*JobR) SetError

func (r *JobR) SetError(err error) *JobR

SetError AFAIRE.

func (*JobR) SetValue

func (r *JobR) SetValue(value string) *JobR

SetValue AFAIRE.

type JobRunner

type JobRunner interface {
	Namespace() string
	RunJob(job *Job, logger logger.Logger) *JobR
}

JobRunner AFAIRE.

type Model

type Model interface {
	CreateJob(job *job.Job) (bool, error)
	NextJob() (*Job, logger.Logger)
	UpdateJob(job *Job, logger logger.Logger, jr *JobR)
	CreateWorkflow(wf *workflow.Workflow) error
}

Model AFAIRE.

func New

func New(cfg *Config) Model

New AFAIRE.

Jump to

Keyboard shortcuts

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