queue

package
v0.1.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: May 29, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecResult

type ExecResult struct {
	Successful  bool
	RetournedCR actions.ChainedResult
	Err         error
}

ExecResult represents the returned result of a executed action.

type Job

type Job struct {
	TaskID     string
	Action     actions.Action
	UserAction *data.UserAction
	PreviousCR actions.ChainedResult
	OutputChan chan ExecResult
}

Job represents a task to be executed on the pool.

type Queue

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

Queue is where the jobs are executed.

func NewQueue

func NewQueue() *Queue

NewQueue initializes the pool of actions execution.

func (*Queue) AddJob

func (q *Queue) AddJob(taskID string, action actions.Action, userAction *data.UserAction, previousCR actions.ChainedResult) (result chan ExecResult)

AddJob adds a new job to be processed by the workers.

Jump to

Keyboard shortcuts

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