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 ¶
func (hm *SequencerHealthMonitor) Start(ctx context.Context) error
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.
Click to show internal directories.
Click to hide internal directories.