Documentation
¶
Overview ¶
Package rundocument implements the aws:runDocument plugin
Package rundocument implements the aws:runDocument plugin
Index ¶
- Constants
- func Name() string
- type ExecDocument
- type ExecDocumentImpl
- func (exec ExecDocumentImpl) ExecuteDocument(config contracts.Configuration, context context.T, ...) (resultChannels chan contracts.DocumentResult, err error)
- func (exec ExecDocumentImpl) ParseDocument(context context.T, documentRaw []byte, orchestrationDir string, ...) (pluginsInfo []contracts.PluginState, err error)
- type ExecutePluginDepth
- type NoOpDocumentMgr
- func (m *NoOpDocumentMgr) GetDocumentState(fileName, locationFolder string) contracts.DocumentState
- func (m *NoOpDocumentMgr) MoveDocumentState(fileName, srcLocationFolder, dstLocationFolder string)
- func (m *NoOpDocumentMgr) PersistDocumentState(fileName, locationFolder string, state contracts.DocumentState)
- func (m *NoOpDocumentMgr) RemoveDocumentState(fileName, locationFolder string)
- type Plugin
- type RunDocumentPluginInput
Constants ¶
const ( SSMDocumentType = "SSMDocument" LocalPathType = "LocalPath" FailExitCode = 1 PassExitCode = 0 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ExecDocument ¶
type ExecDocument interface { ParseDocument(context context.T, documentRaw []byte, orchestrationDir string, s3Bucket string, s3KeyPrefix string, messageID string, documentID string, defaultWorkingDirectory string, params map[string]interface{}) (pluginsInfo []contracts.PluginState, err error) ExecuteDocument(config contracts.Configuration, context context.T, pluginInput []contracts.PluginState, documentID string, documentCreatedDate string) (chan contracts.DocumentResult, error) }
type ExecDocumentImpl ¶
func (ExecDocumentImpl) ExecuteDocument ¶
func (exec ExecDocumentImpl) ExecuteDocument(config contracts.Configuration, context context.T, pluginInput []contracts.PluginState, documentID string, documentCreatedDate string) (resultChannels chan contracts.DocumentResult, err error)
ExecuteDocument is responsible to execute the sub-documents that are created or downloaded by the executeCommand plugin
func (ExecDocumentImpl) ParseDocument ¶
func (exec ExecDocumentImpl) ParseDocument(context context.T, documentRaw []byte, orchestrationDir string, s3Bucket string, s3KeyPrefix string, messageID string, documentID string, defaultWorkingDirectory string, params map[string]interface{}) (pluginsInfo []contracts.PluginState, err error)
ParseDocument parses the remote document obtained to a format that the executor can use. This function is also responsible for all the validation of document and replacement of parameters
type ExecutePluginDepth ¶
type ExecutePluginDepth struct {
// contains filtered or unexported fields
}
ExecutePluginDepth is the struct that is sent through to the sub-documents to maintain the depth of execution
type NoOpDocumentMgr ¶
type NoOpDocumentMgr struct {
// contains filtered or unexported fields
}
Workaround to keep this plugin from overwriting the DocumentState of the top-level document.
Up until version 3.0.732.0, this plugin always failed to write the DocumentState to file due to a path calculation bug. In 3.0.732.0, the path calculation bug was fixed, and the plugin started overwriting the top-level document's DocumentState, which sometimes interfered with plugins in the top-level document that executed after this one. NoOpDocumentMgr is meant to keep this plugin from overwriting the state of the top-level document. However, it does not persist the DocumentState over a reboot, and it does not track the status (e.g. "pending", "current", "corrupt") of the document. Longer-term, we may want to implement proper DocumentState bookkeeping for the documents executed by this plugin.
func NewNoOpDocumentMgr ¶
func NewNoOpDocumentMgr(ctx context.T) *NoOpDocumentMgr
func (*NoOpDocumentMgr) GetDocumentState ¶
func (m *NoOpDocumentMgr) GetDocumentState(fileName, locationFolder string) contracts.DocumentState
func (*NoOpDocumentMgr) MoveDocumentState ¶
func (m *NoOpDocumentMgr) MoveDocumentState(fileName, srcLocationFolder, dstLocationFolder string)
func (*NoOpDocumentMgr) PersistDocumentState ¶
func (m *NoOpDocumentMgr) PersistDocumentState(fileName, locationFolder string, state contracts.DocumentState)
func (*NoOpDocumentMgr) RemoveDocumentState ¶
func (m *NoOpDocumentMgr) RemoveDocumentState(fileName, locationFolder string)
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
Plugin is the type for the aws:copyContent plugin.
func (*Plugin) Execute ¶
func (p *Plugin) Execute(config contracts.Configuration, cancelFlag task.CancelFlag, output iohandler.IOHandler)
Execute runs multiple sets of commands and returns their outputs. res.Output will contain a slice of RunCommandPluginOutput.
type RunDocumentPluginInput ¶
type RunDocumentPluginInput struct { contracts.PluginInput DocumentType string `json:"documentType"` DocumentPath string `json:"documentPath"` DocumentParameters interface{} `json:"documentParameters"` }
RunDocumentPluginInput is a struct that holds the parameters sent through send command
Directories
¶
Path | Synopsis |
---|---|
mocks
|
|
rundocument
Package rundocument implements the aws:runDocument plugin
|
Package rundocument implements the aws:runDocument plugin |