mirror of
https://github.com/redis/go-redis.git
synced 2025-10-18 22:08:50 +03:00
- Adds support for handling push notifications with RESP3. - Using this support adds handlers for hitless upgrades. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Hristo Temelski <hristo.temelski@redis.com>
25 lines
470 B
Go
25 lines
470 B
Go
package hitless
|
|
|
|
// State represents the current state of a hitless upgrade 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"
|
|
}
|
|
}
|