status

package
v0.0.0-...-d1d2547 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2018 License: Apache-2.0 Imports: 6 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FormattedMessage

type FormattedMessage struct {
	Lang    string `json:"lang"`
	Message string `json:"message"`
}

type Status

type Status struct {
	Operation        string           `json:"operation"`
	Status           Type             `json:"status"`
	FormattedMessage FormattedMessage `json:"formattedMessage"`
}

type StatusItem

type StatusItem struct {
	Version      float64 `json:"version"`
	TimestampUTC string  `json:"timestampUTC"`
	Status       Status  `json:"status"`
}

type StatusReport

type StatusReport []StatusItem

func NewStatus

func NewStatus(t Type, operation, message string) StatusReport

func (StatusReport) Save

func (r StatusReport) Save(statusFolder string, seqNum int) 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 Type

type Type string
const (
	StatusTransitioning Type = "transitioning"
	StatusError         Type = "error"
	StatusSuccess       Type = "success"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL