checkconsensusvalidatorstatus

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

README

check_consensus_validator_status Task

Description

The check_consensus_validator_status task is focused on verifying the status of validators on the consensus chain. It checks if the validators are in the expected state, as per the specified criteria.

Configuration Parameters

  • validatorPubKey:
    The public key of the validator to be checked. If specified, the task will focus on the validator with this public key.

  • validatorNamePattern:
    A pattern for identifying validators by name. Useful for filtering validators to be checked based on their names.

  • validatorIndex:
    The index of a specific validator. If set, the task focuses on the validator with this index. If null, no filter on validator index is applied.

  • validatorStatus:
    A list of allowed validator statuses. The task will check if the validator's status matches any of the statuses in this list.

  • failOnCheckMiss:
    Determines the task's behavior if the validator's status does not match any of the statuses in validatorStatus. If false, the task will continue running and wait for the validator to match the expected status. If true, the task will fail immediately upon a status mismatch.

Defaults

These are the default settings for the check_consensus_validator_status task:

- name: check_consensus_validator_status
  config:
    validatorPubKey: ""
    validatorNamePattern: ""
    validatorIndex: null
    validatorStatus: []
    failOnCheckMiss: false

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TaskName       = "check_consensus_validator_status"
	TaskDescriptor = &types.TaskDescriptor{
		Name:        TaskName,
		Description: "Check validator status on consensus chain.",
		Config:      DefaultConfig(),
		NewTask:     NewTask,
	}
)

Functions

func NewTask

func NewTask(ctx *types.TaskContext, options *types.TaskOptions) (types.Task, error)

Types

type Config

type Config struct {
	ValidatorPubKey      string   `yaml:"validatorPubKey" json:"validatorPubKey"`
	ValidatorNamePattern string   `yaml:"validatorNamePattern" json:"validatorNamePattern"`
	ValidatorIndex       *uint64  `yaml:"validatorIndex" json:"validatorIndex"`
	ValidatorStatus      []string `yaml:"validatorStatus" json:"validatorStatus"`
	FailOnCheckMiss      bool     `yaml:"failOnCheckMiss" json:"failOnCheckMiss"`
}

func DefaultConfig

func DefaultConfig() Config

func (*Config) Validate

func (c *Config) Validate() error

type Task

type Task struct {
	// contains filtered or unexported fields
}

func (*Task) Config

func (t *Task) Config() interface{}

func (*Task) Description

func (t *Task) Description() string

func (*Task) Execute

func (t *Task) Execute(ctx context.Context) error

func (*Task) LoadConfig

func (t *Task) LoadConfig() error

func (*Task) Logger

func (t *Task) Logger() logrus.FieldLogger

func (*Task) Name

func (t *Task) Name() string

func (*Task) Timeout

func (t *Task) Timeout() time.Duration

func (*Task) Title

func (t *Task) Title() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL