heartbeat

package
v1.20.2 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: MIT Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Heartbeat

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

Activity that emits periodic heartbeats and exposes a simple liveness RPC.

func New

func New(log oplog.Logger, interval time.Duration) *Heartbeat

New creates a new Heartbeat activity.

func (*Heartbeat) Name

func (h *Heartbeat) Name() string

func (*Heartbeat) RPCNamespace

func (h *Heartbeat) RPCNamespace() string

RPCNamespace returns the JSON-RPC namespace for this activity.

func (*Heartbeat) RPCService

func (h *Heartbeat) RPCService() interface{}

RPCService returns the service object whose exported methods are exposed in RPC.

func (*Heartbeat) Reset

func (h *Heartbeat) Reset(chainID eth.ChainID, timestamp uint64, invalidatedBlock eth.BlockRef)

Reset is a no-op for heartbeat - it has no chain-specific state.

func (*Heartbeat) Start

func (h *Heartbeat) Start(ctx context.Context) error

Start begins the periodic logging loop.

func (*Heartbeat) Stop

func (h *Heartbeat) Stop(ctx context.Context) error

Stop stops the heartbeat loop.

Jump to

Keyboard shortcuts

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