Documentation
¶
Index ¶
- Constants
- Variables
- func GetClientLogo(client string) string
- func IsCLClient(client string) bool
- func IsELClient(client string) bool
- type CLFinalizedEpochCheck
- type CLSyncCheck
- type Category
- type Check
- type ClientType
- type Config
- type ELBlockHeightCheck
- type ELSyncCheck
- type HeadSlotCheck
- type Result
- type Runner
- type Status
Constants ¶
const ( CLLighthouse = "lighthouse" CLPrysm = "prysm" CLLodestar = "lodestar" CLNimbus = "nimbus" CLTeku = "teku" CLGrandine = "grandine" ELNethermind = "nethermind" ELNimbusel = "nimbusel" ELBesu = "besu" ELGeth = "geth" ELReth = "reth" ELErigon = "erigon" ELEthereumJS = "ethereumjs" )
Define a list of known clients.
Variables ¶
var ( CLClients = []string{CLLighthouse, CLPrysm, CLLodestar, CLNimbus, CLTeku, CLGrandine} ELClients = []string{ELNethermind, ELNimbusel, ELBesu, ELGeth, ELReth, ELErigon, ELEthereumJS} )
Buckets of known clients.
Functions ¶
func GetClientLogo ¶ added in v0.0.7
GetClientLogo returns the Twitter profile image URL for a given client.
func IsCLClient ¶
IsCLClient returns true if the client is a consensus client.
func IsELClient ¶
IsELClient returns true if the client is an execution client.
Types ¶
type CLFinalizedEpochCheck ¶
type CLFinalizedEpochCheck struct {
// contains filtered or unexported fields
}
CLFinalizedEpochCheck is a check that verifies if the CL finalized epoch is advancing.
func NewCLFinalizedEpochCheck ¶
func NewCLFinalizedEpochCheck(grafanaClient grafana.GrafanaClient) *CLFinalizedEpochCheck
NewCLFinalizedEpochCheck creates a new CLFinalizedEpochCheck.
func (*CLFinalizedEpochCheck) Category ¶
func (c *CLFinalizedEpochCheck) Category() Category
Category returns the category of the check.
func (*CLFinalizedEpochCheck) ClientType ¶
func (c *CLFinalizedEpochCheck) ClientType() ClientType
ClientType returns the client type of the check.
func (*CLFinalizedEpochCheck) Name ¶
func (c *CLFinalizedEpochCheck) Name() string
Name returns the name of the check.
type CLSyncCheck ¶
type CLSyncCheck struct {
// contains filtered or unexported fields
}
CLSyncCheck is a check that verifies if the CL nodes are syncing.
func NewCLSyncCheck ¶
func NewCLSyncCheck(grafanaClient grafana.GrafanaClient) *CLSyncCheck
NewCLSyncCheck creates a new CLSyncCheck.
func (*CLSyncCheck) Category ¶
func (c *CLSyncCheck) Category() Category
Category returns the category of the check.
func (*CLSyncCheck) ClientType ¶
func (c *CLSyncCheck) ClientType() ClientType
ClientType returns the client type of the check.
type Check ¶
type Check interface {
// Name returns the name of the check.
Name() string
// Category returns the category of the check.
Category() Category
// ClientType returns the client type of the check.
ClientType() ClientType
// Run executes the check and returns the result.
Run(ctx context.Context, cfg Config) (*Result, error)
}
Check represents a single health check.
type ClientType ¶
type ClientType string
ClientType represents the type of client.
const ( ClientTypeAll ClientType = ".*" ClientTypeCL ClientType = "consensus" ClientTypeEL ClientType = "execution" )
Define the client types.
func (ClientType) String ¶
func (c ClientType) String() string
String returns the string representation of a client type.
type ELBlockHeightCheck ¶
type ELBlockHeightCheck struct {
// contains filtered or unexported fields
}
ELBlockHeightCheck is a check that verifies if the EL nodes are advancing.
func NewELBlockHeightCheck ¶
func NewELBlockHeightCheck(grafanaClient grafana.GrafanaClient) *ELBlockHeightCheck
NewELBlockHeightCheck creates a new ELBlockHeightCheck.
func (*ELBlockHeightCheck) Category ¶
func (c *ELBlockHeightCheck) Category() Category
Category returns the category of the check.
func (*ELBlockHeightCheck) ClientType ¶
func (c *ELBlockHeightCheck) ClientType() ClientType
ClientType returns the client type of the check.
func (*ELBlockHeightCheck) Name ¶
func (c *ELBlockHeightCheck) Name() string
Name returns the name of the check.
type ELSyncCheck ¶
type ELSyncCheck struct {
// contains filtered or unexported fields
}
ELSyncCheck is a check that verifies if the EL nodes are syncing.
func NewELSyncCheck ¶
func NewELSyncCheck(grafanaClient grafana.GrafanaClient) *ELSyncCheck
NewELSyncCheck creates a new ELSyncCheck.
func (*ELSyncCheck) Category ¶
func (c *ELSyncCheck) Category() Category
Category returns the category of the check.
func (*ELSyncCheck) ClientType ¶
func (c *ELSyncCheck) ClientType() ClientType
ClientType returns the client type of the check.
type HeadSlotCheck ¶
type HeadSlotCheck struct {
// contains filtered or unexported fields
}
HeadSlotCheck is a check that verifies if the CL head slot is advancing.
func NewHeadSlotCheck ¶
func NewHeadSlotCheck(grafanaClient grafana.GrafanaClient) *HeadSlotCheck
NewHeadSlotCheck creates a new HeadSlotCheck.
func (*HeadSlotCheck) Category ¶
func (c *HeadSlotCheck) Category() Category
Category returns the category of the check.
func (*HeadSlotCheck) ClientType ¶
func (c *HeadSlotCheck) ClientType() ClientType
ClientType returns the client type of the check.
func (*HeadSlotCheck) Name ¶
func (c *HeadSlotCheck) Name() string
Name returns the name of the check.
type Result ¶
type Result struct {
Name string
Category Category
Status Status
Description string
Timestamp time.Time
Details map[string]interface{}
AffectedNodes []string
}
Result represents the outcome of a health check.
type Runner ¶
type Runner interface {
// RegisterCheck adds a check to the runner.
RegisterCheck(check Check)
// RunChecks executes all registered checks.
RunChecks(ctx context.Context, cfg Config) ([]*Result, *analyzer.AnalysisResult, error)
}
Runner executes health checks.
func NewDefaultRunner ¶
func NewDefaultRunner() Runner
NewDefaultRunner creates a new default check runner.