types: add Unhealthy and SessionEpoch fields to Node
Runtime-only (gorm:"-") fields read by the HA primary route refactor. Updates #3203
This commit is contained in:
parent
010a5564c5
commit
1fe682b141
3 changed files with 24 additions and 1 deletions
|
|
@ -154,6 +154,16 @@ type Node struct {
|
|||
DeletedAt *time.Time
|
||||
|
||||
IsOnline *bool `gorm:"-"`
|
||||
|
||||
// Unhealthy excludes the node from primary route election while
|
||||
// online. Written by the HA prober. Runtime-only.
|
||||
Unhealthy bool `gorm:"-"`
|
||||
|
||||
// SessionEpoch identifies a poll session. Connect bumps it; a
|
||||
// Disconnect carrying a stale value is dropped, so a deferred
|
||||
// disconnect from a previous session cannot overwrite a newer
|
||||
// Connect. Runtime-only.
|
||||
SessionEpoch uint64 `gorm:"-"`
|
||||
}
|
||||
|
||||
type Nodes []*Node
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue