Documentation ¶
Overview ¶
Package model provides model definitions for document state
Package model provides model definitions for document state
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsManagedInstanceIncompatibleAWSSSMDocument ¶
IsManagedInstanceIncompatibleAWSSSMDocument checks if doc could contain incompatible code for managed instance
func RemoveDependencyOnInstanceMetadata ¶
func RemoveDependencyOnInstanceMetadata(context context.T, docState *DocumentState) error
RemoveDependencyOnInstanceMetadata looks for array of commands which will be executed as a part of this document and replace the incompatible code.
Types ¶
type CancelCommandInfo ¶
type CancelCommandInfo struct { CancelMessageID string CancelCommandID string Payload string DebugInfo string }
CancelCommandInfo represents information relevant to a cancel-command that agent receives TODO This might be revisited when Agent-cli is written to list previously executed commands
type DocumentInfo ¶
type DocumentInfo struct { // DocumentID is a unique name for file system // For Association, DocumentID = AssociationID.RunID // For RunCommand, DocumentID = CommandID DocumentID string AdditionalInfo contracts.AdditionalInfo CommandID string AssociationID string InstanceID string MessageID string RunID string CreatedDate string DocumentName string IsCommand bool DocumentStatus contracts.ResultStatus DocumentTraceOutput string RuntimeStatus map[string]*contracts.PluginRuntimeStatus RunCount int }
DocumentInfo represents information stored as interim state for a document
type DocumentState ¶
type DocumentState struct { DocumentInformation DocumentInfo DocumentType DocumentType SchemaVersion string InstancePluginsInformation []PluginState CancelInformation CancelCommandInfo }
DocumentState represents information relevant to a command that gets executed by agent
func (*DocumentState) IsAssociation ¶
func (c *DocumentState) IsAssociation() bool
IsAssociation returns if documentType is association
func (*DocumentState) IsRebootRequired ¶
func (c *DocumentState) IsRebootRequired() bool
IsRebootRequired returns if reboot is needed
type DocumentType ¶
type DocumentType string
DocumentType defines the type of document persists locally.
const ( // SendCommand represents document type for send command SendCommand DocumentType = "SendCommand" // CancelCommand represents document type for cancel command CancelCommand DocumentType = "CancelComamnd" // Association represents document type for association Association DocumentType = "Association" // SendCommandOffline represents document type for send command received from offline service SendCommandOffline DocumentType = "SendCommandOffline" // CancelCommandOffline represents document type for cancel command received from offline service CancelCommandOffline DocumentType = "CancelCommandOffline" )
type PluginState ¶
type PluginState struct { Configuration contracts.Configuration Name string Result contracts.PluginResult HasExecuted bool Id string }
PluginState represents information stored as interim state for any plugin This has both the configuration with which a plugin gets executed and a corresponding plugin result.