Documentation ¶
Index ¶
- Variables
- func AddJob(agentID uuid.UUID, jobType string, jobArgs []string) (string, error)
- func GetAgentFieldValue(agentID uuid.UUID, field string) (string, error)
- func GetAgentList() func(string) []string
- func GetAgentStatus(agentID uuid.UUID) string
- func GetMessageForJob(agentID uuid.UUID, job Job) (messages.Base, error)
- func InitialCheckIn(j messages.Base)
- func Log(agentID uuid.UUID, logMessage string)
- func RemoveAgent(agentID uuid.UUID) error
- func ShowInfo(agentID uuid.UUID)
- func StatusCheckIn(j messages.Base) (messages.Base, error)
- func UpdateInfo(j messages.Base, p messages.AgentInfo)
- type Job
Constants ¶
This section is empty.
Variables ¶
var Agents = make(map[uuid.UUID]*agent)
Agents contains all of the instantiated agent object that are accessed by other modules
Functions ¶
func AddJob ¶ added in v0.6.0
AddJob creates a job and adds it to the specified agent's channel and returns the Job ID or an error
func GetAgentFieldValue ¶ added in v0.7.0
GetAgentFieldValue returns a string value for the field value belonging to the specefied Agent
func GetAgentList ¶
GetAgentList returns a list of agents that exist and is used for command line tab completion
func GetAgentStatus ¶ added in v0.6.0
func GetAgentStatus(agentID uuid.UUID) string
GetAgentStatus evaluates the agent's last check in time and max wait time to determine if it is active, delayed, or dead
func GetMessageForJob ¶ added in v0.6.0
GetMessageForJob returns a Message Base structure for the provided job type
func InitialCheckIn ¶
InitialCheckIn is run on the first communication with an agent and is used to instantiate an agent object
func Log ¶
func Log(agentID uuid.UUID, logMessage string)
Log is used to write log messages to the agent's log file
func RemoveAgent ¶ added in v0.6.0
func RemoveAgent(agentID uuid.UUID) error
RemoveAgent deletes the agent object from Agents map by its ID
func ShowInfo ¶
func ShowInfo(agentID uuid.UUID)
ShowInfo lists all of the agent's structure value in a table
func StatusCheckIn ¶
StatusCheckIn is the function that is run when an agent sends a message back to server, checking in for additional instructions