Documentation ¶
Index ¶
- func GetAccount(ops HTTPOptions, cfg *config.Config, c client.Client)
- func GetBlockDetails(cfg *config.Config, height int64) *consensus.Block
- func GetBlockTimeDiff(ops HTTPOptions, cfg *config.Config, c client.Client)
- func GetContinuousMissedBlock(cfg *config.Config, c client.Client) string
- func GetEmergencyContinuousMissedBlocks(cfg *config.Config, c client.Client) string
- func GetMissedBlock(ops HTTPOptions, cfg *config.Config, c client.Client)
- func GetNetworkEpoch(ops HTTPOptions, cfg *config.Config, c client.Client)
- func GetNetworkLatestHeight(ops HTTPOptions, cfg *config.Config, c client.Client)
- func GetSelfDelegationBal(ops HTTPOptions, cfg *config.Config, c client.Client)
- func GetStatus(ops HTTPOptions, cfg *config.Config, c client.Client)
- func GetValAlertCount(cfg *config.Config, c client.Client) string
- func GetValEpoch(ops HTTPOptions, cfg *config.Config, c client.Client)
- func GetValidatorBlock(cfg *config.Config, c client.Client) string
- func GetValidatorEpoch(cfg *config.Config, c client.Client) string
- func GetValidatorsList(ops HTTPOptions, cfg *config.Config, c client.Client)
- func GetlatestCurrentHeightFromDB(cfg *config.Config, c client.Client) string
- func GetlatestCurrentHeightFromMissedBlocks(cfg *config.Config, c client.Client) string
- func NewRunner() *targetRunner
- func NodeStatus(ops HTTPOptions, cfg *config.Config, c client.Client)
- func NodeVersion(ops HTTPOptions, cfg *config.Config, c client.Client)
- func SendEmailAlert(msg string, cfg *config.Config) error
- func SendEmeregencyAlerts(cfg *config.Config, c client.Client, cbh string) error
- func SendEmergencyEmailAlert(msg string, cfg *config.Config) error
- func SendSingleMissedBlockAlert(cfg *config.Config, c client.Client, blockHeight string) error
- func SendTelegramAlert(msg string, cfg *config.Config) error
- func ValidatorStatusAlert(cfg *config.Config, c client.Client, isVoting bool)
- type HTTPOptions
- type NetworkEpochNumber
- type NetworkLatestBlock
- type Peer
- type PingResp
- type QueryParams
- type Target
- type Targets
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAccount ¶
func GetAccount(ops HTTPOptions, cfg *config.Config, c client.Client)
GetAccount returns the account descriptor for the given account.
func GetBlockDetails ¶
GetBlockDetails returns validator block details
func GetBlockTimeDiff ¶
func GetBlockTimeDiff(ops HTTPOptions, cfg *config.Config, c client.Client)
GetBlockTimeDifference to calculate block time difference of prev block and current block
func GetContinuousMissedBlock ¶
GetContinuousMissedBlock returns the latest missed block from the db
func GetEmergencyContinuousMissedBlocks ¶
GetContinuousMissedBlock returns the latest missed block height from the db
func GetMissedBlock ¶
func GetMissedBlock(ops HTTPOptions, cfg *config.Config, c client.Client)
GetMissedBlock checks if the validator is missing any blocks, if so it will send telegram and email alerts to the user about missed blocks
func GetNetworkEpoch ¶
func GetNetworkEpoch(ops HTTPOptions, cfg *config.Config, c client.Client)
GetNetworkEpoch returns the work epoch number of the network
func GetNetworkLatestHeight ¶
func GetNetworkLatestHeight(ops HTTPOptions, cfg *config.Config, c client.Client)
GetNetworkLatestHeight to get the latest height of the network
func GetSelfDelegationBal ¶
func GetSelfDelegationBal(ops HTTPOptions, cfg *config.Config, c client.Client)
GetSelfDelegationBal is to returns the escrow
func GetStatus ¶
func GetStatus(ops HTTPOptions, cfg *config.Config, c client.Client)
GetStatus returns the current status overview and alerts the user based on user configuration
func GetValAlertCount ¶
GetValAlertCount returns count of the val status alert
func GetValEpoch ¶
func GetValEpoch(ops HTTPOptions, cfg *config.Config, c client.Client)
GetValEpoch returns the work epoch number
func GetValidatorBlock ¶
GetValidatorBlock returns current block height of a validator from db
func GetValidatorEpoch ¶
GetValidatorEpoch returns the epoch number of the validator from db
func GetValidatorsList ¶
func GetValidatorsList(ops HTTPOptions, cfg *config.Config, c client.Client)
GetValidatorsList gives the details of your validator
func GetlatestCurrentHeightFromDB ¶
GetlatestCurrentHeightFromDB returns latest current height from db
func GetlatestCurrentHeightFromMissedBlocks ¶
GetlatestCurrentHeightFromDB returns latest current height from db
func NodeStatus ¶
func NodeStatus(ops HTTPOptions, cfg *config.Config, c client.Client)
NodeStatus returns weather the node is up or not
func NodeVersion ¶
func NodeVersion(ops HTTPOptions, cfg *config.Config, c client.Client)
NodeVersion returns the version of the oasis node
func SendEmailAlert ¶
SendEmailAlert sends alert to email account by checking user's choice
func SendEmeregencyAlerts ¶
SendEmeregencyAlerts is to send alerts to pager duty if validator miss blocks continously after an alert triggers in pager duty you will be getting calls to your mobile based on the configuration you have done in pagerduty
func SendEmergencyEmailAlert ¶
SendEmergencyEmailAlert sends alert pager duty account
func SendSingleMissedBlockAlert ¶
SendSingleMissedBlockAlert is to send alert about single missed block alerts
func SendTelegramAlert ¶
SendTelegramAlert sends the alert to telegram account by checking user's choice
Types ¶
type HTTPOptions ¶
type HTTPOptions struct { Endpoint string QueryParams QueryParams Body []byte Method string }
HTTPOptions is a structure that holds all http options parameters
type NetworkEpochNumber ¶
type NetworkEpochNumber struct {
Result int `json:"result"`
}
NetworkEpochNumber which holds the epoch number of the network
type NetworkLatestBlock ¶
type NetworkLatestBlock struct { Result struct { Height int `json:"height"` Time string `json:"time"` Meta string `json:"meta"` } `json:"result"` }
NetworkLatestBlock which holds the information about network latest block
type Peer ¶
type Peer struct { RemoteIP string `json:"remote_ip"` ConnectionStatus interface{} `json:"connection_status"` IsOutbound bool `json:"is_outbound"` NodeInfo struct { Moniker string `json:"moniker"` Network string `json:"network"` } `json:"node_info"` }
Peer is a structure which holds the info about a peer address
type PingResp ¶
PingResp is a structure which holds the options of a response
func HitHTTPTarget ¶
func HitHTTPTarget(ops HTTPOptions) (*PingResp, error)
HitHTTPTarget to hit the target and get response
type Target ¶
type Target struct { ExecutionType string HTTPOptions HTTPOptions Name string Func func(m HTTPOptions, cfg *config.Config, c client.Client) ScraperRate string }
Target is a structure which holds all the parameters of a target this could be used to write endpoints for each functionality