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.
Click to show internal directories.
Click to hide internal directories.