Documentation
¶
Index ¶
Constants ¶
View Source
const ( // RoleActive is the role of the validator that is active RoleActive = "active" // RolePassive is the role of the validator that is passive RolePassive = "passive" // RoleUnknown is the role of the validator that is unknown RoleUnknown = "unknown" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type State ¶
type State struct {
Cluster string
VersionString string
HealthStatus string
IdentityPublicKey string
Version *version.Version
}
State represents the state of the validator
type Validator ¶
type Validator struct {
ActiveIdentityPublicKey string
PassiveIdentityPublicKey string
State State
// contains filtered or unexported fields
}
Validator represents the validator - its state can be refreshed with the RefreshState method
func (*Validator) IsPassive ¶
IsPassive checks if the validator is the passive identity cover cases like testnet where a validator could be given the same active and passive identity in that case, we assume active
func (*Validator) IsRoleUnknown ¶
IsRoleUnknown checks if the validator is running with an identity that does not match active or passive identities
func (*Validator) SyncVersion ¶
SyncVersion syncs the validator's version
Click to show internal directories.
Click to hide internal directories.