monitoring

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BalanceAlert

type BalanceAlert struct {
	Wallet    string    `json:"wallet"`
	Balance   float64   `json:"balance"`
	Threshold float64   `json:"threshold"`
	Timestamp time.Time `json:"timestamp"`
}

BalanceAlert contains information about a wallet with low balance.

type BalanceMonitor

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

BalanceMonitor periodically checks server wallet balances and sends alerts when balances are low.

func NewBalanceMonitor

func NewBalanceMonitor(cfg *config.Config, rpcClient *rpc.Client, wallets []solana.PrivateKey) *BalanceMonitor

NewBalanceMonitor creates a new balance monitor for the configured server wallets.

func (*BalanceMonitor) Start

func (m *BalanceMonitor) Start(ctx context.Context)

Start begins the balance monitoring loop.

func (*BalanceMonitor) Stop

func (m *BalanceMonitor) Stop()

Stop gracefully stops the balance monitoring loop.

Jump to

Keyboard shortcuts

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