health

package
v1.9.5 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSequencerNotHealthy     = errors.New("sequencer is not healthy")
	ErrSequencerConnectionDown = errors.New("cannot connect to sequencer rpc endpoints")
)

Functions

This section is empty.

Types

type HealthMonitor

type HealthMonitor interface {
	// Subscribe returns a channel that will be notified for every health check.
	Subscribe() <-chan error
	// Start starts the health check.
	Start(ctx context.Context) error
	// Stop stops the health check.
	Stop() error
}

HealthMonitor defines the interface for monitoring the health of the sequencer.

func NewSequencerHealthMonitor

func NewSequencerHealthMonitor(log log.Logger, metrics metrics.Metricer, interval, unsafeInterval, safeInterval, minPeerCount uint64, safeEnabled bool, rollupCfg *rollup.Config, node dial.RollupClientInterface, p2p p2p.API) HealthMonitor

NewSequencerHealthMonitor creates a new sequencer health monitor. interval is the interval between health checks measured in seconds. safeInterval is the interval between safe head progress measured in seconds. minPeerCount is the minimum number of peers required for the sequencer to be healthy.

type SequencerHealthMonitor

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

SequencerHealthMonitor monitors sequencer health.

func (*SequencerHealthMonitor) Start

Start implements HealthMonitor.

func (*SequencerHealthMonitor) Stop

func (hm *SequencerHealthMonitor) Stop() error

Stop implements HealthMonitor.

func (*SequencerHealthMonitor) Subscribe

func (hm *SequencerHealthMonitor) Subscribe() <-chan error

Subscribe implements HealthMonitor.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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