health

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(addr string, checker Checker) *http.Server

Serve starts a minimal /healthz handler.

func Shutdown

func Shutdown(ctx context.Context, srv *http.Server) error

Shutdown gracefully shuts down the health server.

Types

type Checker

type Checker struct {
	DBPing  func(ctx context.Context) error
	RPCPing func(ctx context.Context) error
}

type RPCChecker

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

RPCChecker combines multiple RPC health checks.

func NewRPCChecker

func NewRPCChecker(evmClients map[string]evm.BlockClient, algorandClients map[string]algorand.AlgodClient) *RPCChecker

NewRPCChecker creates a checker for multiple RPC sources.

func (*RPCChecker) Ping

func (c *RPCChecker) Ping(ctx context.Context) error

Ping checks all configured RPC endpoints.

Jump to

Keyboard shortcuts

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