Documentation ¶
Index ¶
- func GetCommandInvocationResult(context ssmiface.SSMAPI, jobs ...*ssm.SendCommandOutput) (invocationStatus []*ssm.GetCommandInvocationOutput, err error)
- func RunSSMCommand(session ssmiface.SSMAPI, params *RunShellScriptParameters, dryRunFlag bool, ...)
- type CommandOutputSafe
- type Result
- type ResultSafe
- type RunShellScriptParameters
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCommandInvocationResult ¶
func GetCommandInvocationResult(context ssmiface.SSMAPI, jobs ...*ssm.SendCommandOutput) (invocationStatus []*ssm.GetCommandInvocationOutput, err error)
GetCommandInvocationResult takes an SSM context and any number of *ssm.SendCommandOutput objects and iterates through them until the invocation is complete. Each invocation is checked concurrently, but the method as a whole is blocking until all invocations have returned a finishing result, whether successful or not.
func RunSSMCommand ¶
func RunSSMCommand(session ssmiface.SSMAPI, params *RunShellScriptParameters, dryRunFlag bool, resultChan chan *ssm.SendCommandOutput, errChan chan error, instanceID ...string)
RunSSMCommand uses an SSM session, pre-defined SSM document parameters, the dry run flag, and any number of instance IDs and executes the given command using the AWS-RunShellScript SSM document. It returns an *ssm.SendCommandOutput object, which contains the execution ID of the command, which we use to check the progress/status of the invocation.
Types ¶
type CommandOutputSafe ¶
type CommandOutputSafe struct { sync.Mutex Output []*ssm.SendCommandOutput }
CommandOutputSafe allows for concurrent-safe access to a slice of *ssm.SendCommandOutput info
type Result ¶
type Result struct { InvocationResult *ssm.GetCommandInvocationOutput ProfileName string Region string Status string }
Result is used to store information about an invocation run on a particular instance
type ResultSafe ¶
ResultSafe allows for concurrent-safe access to a slice of InvocationResult info
type RunShellScriptParameters ¶
RunShellScriptParameters is the appropriate struct for use when setting SSM document parameters