Documentation
¶
Index ¶
- Constants
- type Host
- type NoopUpdate
- type Platform
- func (p *Platform) BootUpdate(target platform.Update, rebootNow bool) error
- func (p *Platform) ListAvailable() (platform.Available, error)
- func (p *Platform) Prepare(target platform.Update) error
- func (p *Platform) Status() (platform.Status, error)
- func (p *Platform) Update(target platform.Update) error
- type UpdateID
Constants ¶
const ( CommandStatusQuery hostCommand = "status" CommandListAvailable hostCommand = "list-available" CommandPrepareUpdate hostCommand = "prepare-update" CommandApplyUpdate hostCommand = "apply-update" CommandBootUpdate hostCommand = "boot-update" )
const ( StatusBootable hostStatus = "bootable" StatusUpToDate hostStatus = "up-to-date" StatusUpdateAvailable hostStatus = "available" StatusUpdateApplied hostStatus = "applied" StatusUpdatePrepared hostStatus = "prepared" StatusPendingAction hostStatus = "pending" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Host ¶
type Host interface { Status() (*statusResponse, error) ListAvailable() (*listAvailableResponse, error) PrepareUpdate(id UpdateID) (*prepareUpdateResponse, error) ApplyUpdate(id UpdateID) (*applyUpdateResponse, error) BootUpdate(id UpdateID, rebootNow bool) (*bootUpdateResponse, error) }
Host is the integration for this platform and the host - this is a very light mapping between the platform requirements and the implementation backing the interaction itself.
type NoopUpdate ¶
type NoopUpdate struct{}
func (*NoopUpdate) Identifier ¶
func (n *NoopUpdate) Identifier() interface{}
type Platform ¶
type Platform struct {
// contains filtered or unexported fields
}
func (*Platform) BootUpdate ¶
BootUpdate causes the platform to configure itself to use the update on next boot. Optionally, the caller may indicate that the update should be immediately rebooted to use.
func (*Platform) ListAvailable ¶
ListAvailable provides the list of updates that a platform is offering for use. The list MUST be ordered in preference as well as recency.
func (*Platform) Prepare ¶
Prepare causes the platform to take steps towards an update without committing to it. For example, a platform may require steps to preform pre-flight checks or initialization migrations prior to executing an update.