Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StatusCounts ¶
StatusCounts takes a slice of op references and returns a map containing sums of each Status
Types ¶
type Op ¶
type Op struct { Identifier string `json:"-"` Result map[string]any `json:"result"` ErrString string `json:"error"` // this simplifies json marshaling Error error `json:"-"` Status Status `json:"status"` Params map[string]interface{} `json:"params,omitempty"` Start time.Time `json:"start"` End time.Time `json:"end"` }
Op seeks information via its Runner then stores the results.
func New ¶
func New(id string, result map[string]any, status Status, err error, params map[string]any, start time.Time, end time.Time) Op
New takes a runner its results, serializing it into an immutable Op struct.
type Status ¶
type Status string
Status describes the result of an operation.
const ( // Success means all systems green Success Status = "success" // Fail means that we detected a known error and can conclusively say that the runner did not complete. Fail Status = "fail" // Unknown means that we detected an error and the result is indeterminate (e.g. some side effect like disk or // network may or may not have completed) or we don't recognize the error. If we don't recognize the error that's // a signal to improve the error handling to account for it. Unknown Status = "unknown" // Skip means that this Op was intentionally not run Skip Status = "skip" // Timeout means that an operation timed out during execution. Timeout Status = "timeout" // Canceled means that an operation was canceled during execution. Canceled Status = "canceled" )
Click to show internal directories.
Click to hide internal directories.