Documentation ¶
Index ¶
Constants ¶
View Source
const ( MonitorAll = "*" MonitorNewProposals = "new_proposals" MonitorActiveProposals = "active_proposals" MonitorJailedValidators = "jailed_validators" MonitorDoubleSigning = "double_signing" MonitorMissingSignatures = "missing_signatures" )
Valid monitor configuration value constants.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { PollInterval uint `mapstructure:"poll_interval" validate:"required,gt=10"` Monitors []string `mapstructure:"monitors" validate:"required,validmonitor"` Database Database `mapstructure:"database" validate:"required,dive"` Targets Targets `mapstructure:"targets" validate:"required,dive"` Filters Filters `mapstructure:"filters" validate:"required,dive"` Network NetworkConfig `mapstructure:"network" validate:"required,dive"` Integrations Integrations `mapstructure:"integrations" validate:"required,dive"` }
Config defines the application's configuration structure.
type Database ¶
type Database struct {
DataDir string `mapstructure:"data_dir" validate:"required"`
}
Database defines embedded database configuration.
type Filters ¶
type Filters struct {
Validators []ValidatorFilter `mapstructure:"validator" validate:"required,dive"`
}
Filters defines a set of validator address filters to match against when monitoring and alerting.
type Integrations ¶
type Integrations struct {
SendGrid SendGridAPI `mapstructure:"sendgrid" validate:"required,dive"`
}
Integrations defines integration configuration for utilizing third-party alerting tools.
type NetworkConfig ¶
type NetworkConfig struct { ListenAddr string `mapstructure:"listen_addr" validate:"required,tcp_addr"` Clients []string `mapstructure:"clients" validate:"gt=0,dive,url"` }
NetworkConfig defines network related configuration.
type SendGridAPI ¶
type SendGridAPI struct { Key string `mapstructure:"api_key" validate:"required"` FromName string `mapstructure:"from_name" validate:"required"` }
SendGridAPI defines the required configuration for using the SendGrid API.
type Targets ¶
type Targets struct { Webhooks []string `mapstructure:"webhooks" validate:"dive,url"` SMSRecipients []string `mapstructure:"sms_recipients"` EmailRecipients []string `mapstructure:"email_recipients" validate:"dive,email"` }
Targets defines alerting targets.
type ValidatorFilter ¶
type ValidatorFilter struct { Operator string `mapstructure:"operator" validate:"contains=cosmosaccaddr,required"` Address string `mapstructure:"address" validate:"hexadecimal,required"` }
ValidatorFilter defines a validator filter against.
Click to show internal directories.
Click to hide internal directories.