Documentation
¶
Index ¶
Constants ¶
View Source
const ( CodeCorrupt = "state_corrupt" CodeSchema = "state_schema_unsupported" CodeIdentity = "state_identity_mismatch" )
Stable refusal codes for state decode/validate. All name external repair as the sole next action; the split exists because a future schema and a mismatched identity are diagnosed differently by an operator.
View Source
const SchemaVersion = 1
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Projection ¶
type State ¶
type State struct {
SchemaVersion int `json:"schemaVersion"`
Change string `json:"change"`
Stage string `json:"stage"`
Condition string `json:"condition"`
Revision uint64 `json:"revision"`
Approvals []json.RawMessage `json:"approvals"`
Tasks map[string]json.RawMessage `json:"tasks"`
CreatedBy string `json:"createdBy"`
LastTransition string `json:"lastTransition"`
Extensions map[string]json.RawMessage `json:"extensions,omitempty"`
}
func Mutate ¶
Mutate takes only the change lock. Callers needing a root lock must acquire it first: root before change is the global lock order.
path is <change>/state.json, so the change folder is its directory and the one change lock is the one corepath derives from it, the same file corepath.Owner.ChangeLock names and every other state writer takes.
func (State) Project ¶
func (s State) Project() Projection
Click to show internal directories.
Click to hide internal directories.