Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Status ¶
type Status string
Status defines different possible values for the status of cloud-init in an instance.
const ( // StatusUnknown means that it was impossible to retrieve the status of cloud-init, // perhaps because the "cloud-init status" command was not successful. StatusUnknown Status = "Unknown" // StatusDone means that cloud-init completed successfully. StatusDone Status = "Done" // StatusRunning means that cloud-init is stil running on the instance. StatusRunning Status = "Running" // StatusError means that cloud-init failed. StatusError Status = "Error" )
func ParseStatus ¶
ParseStatus checks the cloud-init status of an instance. It accepts a reader that fetches the /run/cloud-init/status.json file contents.
ParseStatus returns one of the following:
- (StatusDone, nil) - (StatusRunning, nil) - (StatusError, nil) - (StatusUnknown, <error describing why status is unknown>)
Click to show internal directories.
Click to hide internal directories.