Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TaskName = "check_clients_are_healthy" TaskDescriptor = &types.TaskDescriptor{ Name: TaskName, Description: "Checks if clients are healthy.", Category: "utility", Config: DefaultConfig(), Outputs: []types.TaskOutputDefinition{ { Name: "goodClients", Type: "array", Description: "Array of healthy client info objects.", }, { Name: "failedClients", Type: "array", Description: "Array of unhealthy client info objects.", }, { Name: "totalCount", Type: "int", Description: "Total number of clients checked.", }, { Name: "failedCount", Type: "int", Description: "Number of clients that failed health check.", }, { Name: "goodCount", Type: "int", Description: "Number of clients that passed health check.", }, }, NewTask: NewTask, } )
Functions ¶
func NewTask ¶
func NewTask(ctx *types.TaskContext, options *types.TaskOptions) (types.Task, error)
Types ¶
type ClientInfo ¶
type Config ¶
type Config struct {
ClientPattern string `yaml:"clientPattern" json:"clientPattern" desc:"Regex pattern to select specific client endpoints for health checking."`
PollInterval helper.Duration `yaml:"pollInterval" json:"pollInterval" desc:"Interval between health check polls (e.g., '5s', '1m')."`
SkipConsensusCheck bool `yaml:"skipConsensusCheck" json:"skipConsensusCheck" desc:"If true, skip consensus client health checks."`
SkipExecutionCheck bool `yaml:"skipExecutionCheck" json:"skipExecutionCheck" desc:"If true, skip execution client health checks."`
ExpectUnhealthy bool `yaml:"expectUnhealthy" json:"expectUnhealthy" desc:"If true, expect clients to be unhealthy (inverts success condition)."`
MinClientCount int `yaml:"minClientCount" json:"minClientCount" desc:"Minimum number of healthy clients required."`
MaxUnhealthyCount int `yaml:"maxUnhealthyCount" json:"maxUnhealthyCount" desc:"Maximum number of unhealthy clients allowed (-1 for unlimited)."`
FailOnCheckMiss bool `yaml:"failOnCheckMiss" json:"failOnCheckMiss" desc:"If true, fail the task when health check condition is not met."`
ExecutionRPCResultVar string `yaml:"executionRpcResultVar" json:"executionRpcResultVar" deprecated:"true" desc:"Deprecated: Use task outputs instead."`
ConsensusRPCResultVar string `yaml:"consensusRpcResultVar" json:"consensusRpcResultVar" deprecated:"true" desc:"Deprecated: Use task outputs instead."`
ContinueOnPass bool `` /* 137-byte string literal not displayed */
}
func DefaultConfig ¶
func DefaultConfig() Config
type Task ¶
type Task struct {
// contains filtered or unexported fields
}
func (*Task) LoadConfig ¶
Click to show internal directories.
Click to hide internal directories.