heartbeat

package
v1.16.2 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: MIT Imports: 6 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) 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