monitor

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBalanceMonitor

func NewBalanceMonitor(opts BalanceMonitorOpts) (services.Service, error)

NewBalanceMonitor returns a balance monitoring services.Service which reports the XLM balance of all keystore accounts as the Beholder gauge `account_balance`.

Types

type BalanceMonitorOpts

type BalanceMonitorOpts struct {
	ChainInfo balance.ChainInfo

	Config   balance.GenericBalanceConfig
	Logger   logger.Logger
	Keystore core.Keystore

	// GetClient returns a healthy RPC client from the multinode pool. It is
	// called on every balance fetch so no node is pinned across poll cycles.
	GetClient func(ctx context.Context) (BalanceMonitorRPCClient, error)
	// Timeout bounds each balance fetch; GenericBalanceClient carries no context.
	Timeout time.Duration
}

BalanceMonitorOpts contains the options for creating a new Stellar account balance monitor.

type BalanceMonitorRPCClient

type BalanceMonitorRPCClient interface {
	GetLedgerEntries(ctx context.Context, req protocolrpc.GetLedgerEntriesRequest) (protocolrpc.GetLedgerEntriesResponse, error)
}

BalanceMonitorRPCClient is the subset of the Stellar Soroban JSON-RPC client used by the balance monitor.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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