State is an enumeration of possible states a resource may be in. When adding a state here, choose a name that results in no common prefixes between any two states, then update prefix-matching in prefixes.go.
const ( // Resource state unspecified. State_STATE_UNSPECIFIED State = 0 // Resource is not allocated. State_FREE State = 1 // Resource is allocated for future use. State_PRERELEASE State = 2 // Resource is allocated and currently used in production. State_SERVING State = 3 // Resource is allocated and currently used for testing. State_TEST State = 4 // Resource is undergoing repairs. State_REPAIR State = 5 // Resource is allocated but unused. State_DECOMMISSIONED State = 6 )
GetState returns a State given its name. Supports prefix matching.
ValidStates returns a slice of valid states.
Name returns a string which can be used as the human-readable representation expected by GetState.