Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Health check configuration
Health health.CounterConfig
// Maximum allowable duration for sync height to remain unchanged.
MaxStalledDuration time.Duration `default:"5m"`
// Maximum allowed lag in height between the latest chain height and the sync height.
MaxAllowedLag uint64 `default:"200"`
}
Config holds the configuration parameters for the sync monitor.
type HealthObserver ¶
type HealthObserver interface {
OnStateChange(state HealthState, details ...string)
}
type HealthState ¶
type HealthState string
const ( Healthy HealthState = "Healthy" Unhealthy HealthState = "Unhealthy" Unrecovered HealthState = "Unrecovered" )
type Monitor ¶
type Monitor struct {
Config
// contains filtered or unexported fields
}
Monitor periodically checks sync height growth.
func (*Monitor) SetObserver ¶
func (m *Monitor) SetObserver(observer HealthObserver)
Click to show internal directories.
Click to hide internal directories.