Documentation
¶
Overview ¶
Package processor contains the methods for update ssm agent. It also provides methods for sendReply and updateInstanceInfo
Package processor contains the methods for update ssm agent. It also provides methods for sendReply and updateInstanceInfo
Package processor contains the methods for update ssm agent. It also provides methods for sendReply and updateInstanceInfo
Package processor contains the methods for update ssm agent. It also provides methods for sendReply and updateInstanceInfo
Package processor contains the methods for update ssm agent. It also provides methods for sendReply and updateInstanceInfo
Package processor contains the methods for update ssm agent. It also provides methods for sendReply and updateInstanceInfo
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrepareHealthStatus ¶
func PrepareHealthStatus(updateDetail *UpdateDetail, errorCode string, additionalStatus string) (result string)
prepareHealthStatus prepares health status payload
Types ¶
type ContextMgr ¶
type ContextMgr interface {
// contains filtered or unexported methods
}
ContextMgr reprents context management logics
type Service ¶
type Service interface { SendReply(log log.T, update *UpdateDetail) error DeleteMessage(log log.T, update *UpdateDetail) error UpdateHealthCheck(log log.T, update *UpdateDetail, errorCode string) error }
Service is an interface represents for SendReply, UpdateInstanceInfo
type T ¶
type T interface { // StartOrResumeUpdate starts/resumes update. StartOrResumeUpdate(log log.T, updateDetail *UpdateDetail) (err error) // InitializeUpdate initializes update InitializeUpdate(log log.T, detail *UpdateDetail) (err error) // Failed sets update to failed with error messages Failed(updateDetail *UpdateDetail, log log.T, code updateconstants.ErrorCode, errMessage string, noRollbackMessage bool) (err error) }
T represents the interface for agent update
type UpdateDetail ¶
type UpdateDetail struct { State UpdateState Result contracts.ResultStatus StandardOut string StandardError string OutputS3KeyPrefix string OutputS3BucketName string StdoutFileName string StderrFileName string SourceVersion string SourceLocation string SourceHash string TargetVersion string TargetResolver updateconstants.TargetVersionResolver TargetLocation string TargetHash string PackageName string StartDateTime time.Time EndDateTime time.Time MessageID string UpdateRoot string RequiresUninstall bool ManifestURL string Manifest updatemanifest.T SelfUpdate bool AllowDowngrade bool UpstreamServiceName string }
UpdateDetail Book keeping detail for Agent Update
func (*UpdateDetail) AppendError ¶
func (update *UpdateDetail) AppendError(log log.T, format string, params ...interface{})
AppendError appends messages to UpdateDetail StandardError and StandardOut
func (*UpdateDetail) AppendInfo ¶
func (update *UpdateDetail) AppendInfo(log log.T, format string, params ...interface{})
AppendInfo appends messages to UpdateDetail StandardOut
func (*UpdateDetail) HasMessageID ¶
func (update *UpdateDetail) HasMessageID() bool
HasMessageID represents if update is triggered by run command
type UpdateState ¶
type UpdateState string
UpdateState represents the state of update process
const ( // NotStarted represents the state value not started for agent update NotStarted UpdateState = "NotStarted" // Initialized represents the state value initialized for agent update Initialized UpdateState = "Initialized" // Staged represents the state value staged for agent update Staged UpdateState = "Staged" // Installed represents the state value installed for agent update Installed UpdateState = "Installed" // Rollback represents the state value rollback for agent update Rollback UpdateState = "Rollback" // RolledBack represents the state value rolledBack for agent update RolledBack UpdateState = "RolledBack" // Completed represents the state value completed for agent update Completed UpdateState = "Completed" // TestExecution represents state value denoting test execution on customer's instance TestExecution UpdateState = "TestExecution" // UpdaterMetric represents state value to report intermediate update metric UpdaterMetric UpdateState = "UpdaterMetric" )
type Updater ¶
type Updater struct {
// contains filtered or unexported fields
}
Updater contains logic for performing agent update
func NewUpdater ¶
func NewUpdater(context context.T, info updateinfo.T, updateUtilRef *updateutil.Utility) *Updater
NewUpdater creates an instance of Updater and other services it requires
func (*Updater) Failed ¶
func (u *Updater) Failed(updateDetail *UpdateDetail, log log.T, code updateconstants.ErrorCode, errMessage string, noRollbackMessage bool) (err error)
Failed sets update to failed with error messages
func (*Updater) InitializeUpdate ¶
func (u *Updater) InitializeUpdate(log log.T, updateDetail *UpdateDetail) (err error)
InitializeUpdate initializes update, populates update detail
func (*Updater) StartOrResumeUpdate ¶
func (u *Updater) StartOrResumeUpdate(log log.T, updateDetail *UpdateDetail) (err error)
StartOrResumeUpdate starts/resume update.