mirror of
https://github.com/lukaszraczylo/traefikoidc.git
synced 2026-10-14 04:07:46 +00:00
* Size computation for allocation may overflow Performing calculations involving the size of potentially large strings or slices can result in an overflow (for signed integer types) or a wraparound (for unsigned types). An overflow causes the result of the calculation to become negative, while a wraparound results in a small (positive) number.
25 lines
476 B
Go
25 lines
476 B
Go
package maintnotifications
|
|
|
|
// State represents the current state of a maintenance operation
|
|
type State int
|
|
|
|
const (
|
|
// StateIdle indicates no upgrade is in progress
|
|
StateIdle State = iota
|
|
|
|
// StateHandoff indicates a connection handoff is in progress
|
|
StateMoving
|
|
)
|
|
|
|
// String returns a string representation of the state.
|
|
func (s State) String() string {
|
|
switch s {
|
|
case StateIdle:
|
|
return "idle"
|
|
case StateMoving:
|
|
return "moving"
|
|
default:
|
|
return "unknown"
|
|
}
|
|
}
|