jobs

package
v0.0.0-...-5262aa1 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2021 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Jobs = make(map[string]info)

Jobs is a map that contains specific information about an individual job and is embedded in the JobsChannel

View Source
var JobsChannel = make(map[uuid.UUID]chan merlinJob.Job)

JobsChannel contains a map of all instantiated jobs created on the server by each Agent's ID

Functions

func Add

func Add(agentID uuid.UUID, jobType string, jobArgs []string) (string, error)

Add creates a job and adds it to the specified agent's job channel

func Clear

func Clear(agentID uuid.UUID) error

Clear removes any jobs the queue that have been created, but NOT sent to the agent

func Get

func Get(agentID uuid.UUID) ([]merlinJob.Job, error)

Get returns a list of jobs that need to be sent to the agent

func GetTableActive

func GetTableActive(agentID uuid.UUID) ([][]string, error)

GetTableActive returns a list of rows that contain information about active jobs

func Handler

func Handler(m messages.Base) (messages.Base, error)

Handler evaluates a message sent in by the agent and the subsequently executes any corresponding tasks

func Idle

func Idle(agentID uuid.UUID) (messages.Base, error)

Idle handles input idle messages from the agent and checks to see if there are any jobs to return

Types

This section is empty.

Jump to

Keyboard shortcuts

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