Documentation ¶
Index ¶
- func GetAccountBal(cfg *config.Config) string
- func GetBlockProduction(cfg *config.Config) string
- func GetBlockTime(slot int64, cfg *config.Config) (types.BlockTime, error)
- func GetClusterNodes(cfg *config.Config) (types.ClustrNode, error)
- func GetConfirmedBlock(cfg *config.Config, height int64, node string) (types.ConfirmedBlock, error)
- func GetConfirmedBlocks(rangeStart int64, rangeEnd int64, cfg *config.Config) ([]int64, error)
- func GetCurrentSlot(cfg *config.Config, node string) (types.CurrentSlot, error)
- func GetEndPointStatus(cfg *config.Config) string
- func GetEpochDetails(cfg *config.Config) string
- func GetEpochInfo(cfg *config.Config, node string) (types.EpochInfo, error)
- func GetHelp() string
- func GetIdentityBalance(cfg *config.Config) (types.Balance, error)
- func GetLeaderSlots(epochSlot int64, cfg *config.Config) (map[int64]string, error)
- func GetNodeHealth(cfg *config.Config) (float64, error)
- func GetSkipRate(cfg *config.Config) string
- func GetSlotLeader(cfg *config.Config) (types.SlotLeader, error)
- func GetStatus(cfg *config.Config) string
- func GetTxCount(cfg *config.Config) (types.TxCount, error)
- func GetVersion(cfg *config.Config) (types.Version, error)
- func GetVoteAccBalance(cfg *config.Config) (types.Balance, error)
- func GetVoteAccounts(cfg *config.Config, node string) (types.GetVoteAccountsResponse, error)
- func GetVoteCredits(cfg *config.Config) string
- func HitHTTPTarget(ops types.HTTPOptions) (*types.PingResp, error)
- func NodeStatus(cfg *config.Config) string
- func SendBalanceChangeAlert(currentBal int64, cfg *config.Config) error
- func SkipRate(cfg *config.Config) (float64, float64, error)
- func SkipRateAlerts(cfg *config.Config) error
- func Stop() string
- func TelegramAlerting(cfg *config.Config)
- type RecentBlock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAccountBal ¶
GetAccountBal which resturns the account balance for the command /balance
func GetBlockProduction ¶
GetBlockProduction returns the msg of recent block production details
func GetBlockTime ¶
GetBlockTime returns the estimated production time of a confirmed block
func GetClusterNodes ¶
func GetClusterNodes(cfg *config.Config) (types.ClustrNode, error)
GetClusterNodes returns information about all the nodes participating in the cluster
func GetConfirmedBlock ¶
GetConfirmedBlock takes current slot height and returns identity and transaction information about a confirmed block in the ledger
func GetConfirmedBlocks ¶
GetConfirmedBlocks returns a list of confirmed blocks between two slots of given range.
func GetCurrentSlot ¶
GetCurrentSlot returns Current slot
func GetEndPointStatus ¶
GetEndPointsStatus retsurns status of the configured endpoints i.e, val and network rpc.
func GetEpochDetails ¶
GetEpochDetails returns current epoch of validator and network for /epoch
func GetEpochInfo ¶
GetEpochInfo returns information about the current epoch
func GetIdentityBalance ¶
GetIdentityBalance returns the balance of the identity account
func GetLeaderSlots ¶
GetLeaderSlots returns a map of slots associated with the given publickey
func GetNodeHealth ¶
GetNodeHealth returns the current health of the node.
func GetSkipRate ¶
GetSkipRate returns the msg string of skip rate of a validator and network
func GetSlotLeader ¶
func GetSlotLeader(cfg *config.Config) (types.SlotLeader, error)
GetSlotLeader returns the current slot leader
func GetTxCount ¶
GetTxCount returns the current Transaction count from the ledger
func GetVersion ¶
GetVersion returns the current solana versions running on the node
func GetVoteAccBalance ¶
GetVoteAccBalance returns the balance of the vote account
func GetVoteAccounts ¶
GetVoteAccounts returns voting accounts information
func GetVoteCredits ¶
GetVoteCredits returns credits for /vote_credits
func HitHTTPTarget ¶
func HitHTTPTarget(ops types.HTTPOptions) (*types.PingResp, error)
HitHTTPTarget to hit the target and get response
func NodeStatus ¶
NodeStatus returns the node health wetaher it is up or down by giving /node
func SendBalanceChangeAlert ¶
SendBalanceChangeAlert checks balance and DBbalance, If balance dropped to threshold, sends Alerts to the validator
func SkipRateAlerts ¶
func Stop ¶
func Stop() string
Stop which will be used to stop the the running program of monitoring tool
func TelegramAlerting ¶
TelegramAlerting will check for the commands from the configured telegram account If any commands are given in the tg account then Alerter will send the response back according to the input
Types ¶
type RecentBlock ¶
type RecentBlock struct { TotalSlots int `json:"total_slots"` TotalBlocksProduced int `json:"total_blocks_produced"` TotalSlotsSkipped int `json:"total_slots_skipped"` LeaderSlots int `json:"leaderSlots"` BlocksProduced int `json:"blocksProduced"` SkippedSlots int `json:"skippedSlots"` }
func BlockProduction ¶
func BlockProduction(cfg *config.Config) (RecentBlock, error)