executor

package
v0.0.0-...-a01d039 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(contents []byte, process int, httpAddr string, store fsm.Store) bool

Execute is used to decide which of the executeLang and exectureYaml functions to use parameters: contents (byte array containing uid, gid, language and file information), process (int used to decide the function to use in the code), httpAddr (an address string for the engine), store (a store of node information) returns: boolean (returns true if one of the functions executes successfully, false otherwise)

func ProcessError

func ProcessError(err error, errType string) bool

ProcessError is used to switch between the different error types parameters: err (an error to use in a given case), errType (the string used to switch between cases) returns: boolean (returns the true if a case executes successfulyy, false if otherwise)

func ReviewError

func ReviewError(err error, errType string)

ReviewError is used to print out an error if it exists parameters: err (an error to print), errType (the string given to ProcessError) returns: nil

Types

type Data

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

Data is a type used to define channels for execution

type JobNode

type JobNode struct {
	ID       string
	UID      uint32
	GID      uint32
	Lang     string
	File     string
	Schedule []int
	Runs     int
	Links    string
}

JobNode is a type used to define a job as a node in a Queue

type Queue

type Queue []JobNode

Queue is a type used to contain an array of JobNode's

func (Queue) BatchRun

func (queue Queue) BatchRun(httpAddr string, store fsm.Store)

BatchRun is called on a queue type and is used to run the batch loop to run all executions parameters: store (a store of node information) returns: nil

func (Queue) UpdateRuns

func (queue Queue) UpdateRuns(httpAddr string)

UpdateRuns is called on a queue type and is used to update the run number for each job parameters: httpAddr (an address string for the node) returns: nil

Jump to

Keyboard shortcuts

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