monitor

package
v0.0.0-...-8d72633 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const SuiDecimals = 9
View Source
const SuiDecimalsDenominator = 1_000_000_000

Variables

This section is empty.

Functions

func NewBalanceMonitor

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

NewBalanceMonitor returns a balance monitoring services.Service which reports balance of all Keystore accounts.

Types

type BalanceMonitorOpts

type BalanceMonitorOpts struct {
	ChainInfo aptosBalanceMonitor.ChainInfo

	Config    aptosBalanceMonitor.GenericBalanceConfig
	Logger    logger.Logger
	Keystore  core.Keystore
	NewClient func() (client.SuiPTBClient, error)
}

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

type GaugeAccBalance

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

Define a new gauge metric for account balance

func NewGaugeAccBalance

func NewGaugeAccBalance(unitStr string) (*GaugeAccBalance, error)

func (*GaugeAccBalance) GetAttributes

func (g *GaugeAccBalance) GetAttributes(account string, chainInfo config.ChainInfo) attribute.Set

func (*GaugeAccBalance) Record

func (g *GaugeAccBalance) Record(ctx context.Context, balance float64, account string, chainInfo config.ChainInfo)

Jump to

Keyboard shortcuts

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