Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FormattedMessage ¶
FormattedMessage is a struct used for serializing status
type Status ¶
type Status struct { Operation string `json:"operation"` Status StatusType `json:"status"` FormattedMessage FormattedMessage `json:"formattedMessage"` }
Status is used for serializing status in a manner the server understands
type StatusItem ¶
type StatusItem struct { Version int `json:"version"` TimestampUTC string `json:"timestampUTC"` Status Status `json:"status"` }
StatusItem is used to serialize an individual part of the status read by the server
type StatusReport ¶
type StatusReport []StatusItem
StatusReport contains one or more status items and is the parent object
func New ¶
func New(t StatusType, operation string, message string) StatusReport
New creates a new Status instance
func (StatusReport) Save ¶
func (r StatusReport) Save(statusFolder string, seqNo uint) error
Save persists the status message to the specified status folder using the sequence number. The operation consists of writing to a temporary file in the same folder and moving it to the final destination for atomicity.
type StatusType ¶
type StatusType string
const ( // StatusTransitioning indicates the operation has begun but not yet completed StatusTransitioning StatusType = "transitioning" // StatusError indicates the operation failed StatusError StatusType = "error" // StatusSuccess indicates the operation succeeded StatusSuccess StatusType = "success" )
Click to show internal directories.
Click to hide internal directories.