# Packages
No description provided by the author
Package audit is a auditing system that's compatible with the one found in the mcollective-choria Ruby project, log lines will be identical and can be put in the same file as the ruby one.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Package replyfmt formats Replies for presentation to users.
No description provided by the author
# Functions
New creates a new MCollective SimpleRPC compatible agent.
NewChoriaAgentPlugin creates a new plugin for an agent that allows it to plug into the Choria Plugin system.
ParseRequestData parses the request parameters received from the client into a target structure
Validation is supported, the example below does a `shellsafe` check on the data prior to returning it, should the check fail appropriate errors will be set on the reply data
Example used in a action:
var rparams struct { Package string `json:"package" validate:"shellsafe"` }
if !mcorpc.ParseRequestData(&rparams, req, reply) { // the function already set appropriate errors on reply return }
// do stuff with rparams.Package.
# Constants
Aborted is status for when the action could not run, most failures in an action should set this.
InvalidData is the status for invalid input data.
MissingData is the status for missing input data.
OK is the reply status when all worked.
UnknownAction is the status for unknown actions requested.
UnknownError is the status general failures in agents should set when things go bad.
# Structs
Agent is an instance of the MCollective compatible RPC agents.
AgentPlugin is a choria plugin.
Reply is the reply data as stipulated by MCollective RPC system.
Request is a request as defined by the MCollective RPC system.
# Interfaces
ChoriaFramework provides access to the choria framework.
# Type aliases
Action is a function that implements a RPC Action.
ActivationChecker is a function that can determine if an agent should be activated.
StatusCode is a reply status as defined by MCollective SimpleRPC - integers 0 to 5
See the constants OK, RPCAborted, UnknownRPCAction, MissingRPCData, InvalidRPCData and UnknownRPCError.