heartbeat

package
v1.16.7 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: MIT Imports: 7 Imported by: 0

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 gethlog.Logger, interval time.Duration) *Heartbeat

New creates a new Heartbeat activity.

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 added in v1.16.7

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