checkconsensussyncstatus

package
v0.0.5 Latest Latest
Warning

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

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

README

check_consensus_sync_status Task

Description

The check_consensus_sync_status task checks the synchronization status of consensus clients, ensuring they are aligned with the current state of the blockchain network.

Configuration Parameters

  • clientPattern:
    A regular expression pattern used to specify which clients to check. This allows for targeted health checks of specific clients or groups of clients within the network. A blank pattern targets all clients.

  • pollInterval:
    The frequency for checking the clients' sync status.

  • expectSyncing:
    Set to true if the clients are expected to be in a syncing state, or false if they should be fully synced.

  • expectOptimistic:
    When true, expects clients to be in an optimistic sync state.

  • expectMinPercent:
    The minimum sync progress percentage required for the task to succeed.

  • expectMaxPercent:
    The maximum sync progress percentage allowable for the task to succeed.

  • minSlotHeight:
    The minimum slot height that clients should be synced to.

  • waitForChainProgression:
    If set to true, the task checks for blockchain progression in addition to synchronization status. If false, the task solely checks for synchronization status, without waiting for further chain progression.

Defaults

Default settings for the check_consensus_sync_status task:

- name: check_consensus_sync_status
  config:
    clientPattern: ""
    pollInterval: 5s
    expectSyncing: false
    expectOptimistic: false
    expectMinPercent: 100
    expectMaxPercent: 100
    minSlotHeight: 10
    waitForChainProgression: false

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TaskName       = "check_consensus_sync_status"
	TaskDescriptor = &types.TaskDescriptor{
		Name:        TaskName,
		Description: "Checks consensus clients for their sync status.",
		Config:      DefaultConfig(),
		NewTask:     NewTask,
	}
)

Functions

func NewTask

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

Types

type Config

type Config struct {
	ClientPattern           string         `yaml:"clientPattern" json:"clientPattern"`
	PollInterval            human.Duration `yaml:"pollInterval" json:"pollInterval"`
	ExpectSyncing           bool           `yaml:"expectSyncing" json:"expectSyncing"`
	ExpectOptimistic        bool           `yaml:"expectOptimistic" json:"expectOptimistic"`
	ExpectMinPercent        float64        `yaml:"expectMinPercent" json:"expectMinPercent"`
	ExpectMaxPercent        float64        `yaml:"expectMaxPercent" json:"expectMaxPercent"`
	MinSlotHeight           int            `yaml:"minSlotHeight" json:"minSlotHeight"`
	WaitForChainProgression bool           `yaml:"waitForChainProgression" json:"waitForChainProgression"`
}

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