Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct {
// Name is the Solana cluster this validator is running on. One of mainnet-beta or testnet
Name string `koanf:"name"`
}
Cluster represents the Solana cluster configuration
type Config ¶
type Config struct {
// Log configuration
Log Log `koanf:"log"`
// Validator is the local validator configuration
Validator Validator `koanf:"validator"`
// Cluster is the Solana cluster configuration
Cluster Cluster `koanf:"cluster"`
// Sync is the version sync configuration
Sync Sync `koanf:"sync"`
// File is the file that the config was loaded from
File string `koanf:"-"`
// contains filtered or unexported fields
}
Config represents the complete configuration
func NewFromConfigFile ¶
NewFromConfigFile creates a new Config from a config file path
func (*Config) Initialize ¶
Initialize processes and validates the loaded configuration
func (*Config) LoadFromFile ¶
LoadFromFile loads configuration from file into the struct
type Identities ¶
type Identities struct {
// Active is the path to the active identity keyfile
ActiveKeyPairFile string `koanf:"active"`
// Passive is the path to the passive identity keyfile
PassiveKeyPairFile string `koanf:"passive"`
// ActiveKeyPair is the loaded active keypair
ActiveKeyPair solana.PrivateKey `koanf:"-"`
// PassiveKeyPair is the loaded passive keypair
PassiveKeyPair solana.PrivateKey `koanf:"-"`
}
Identities represents the validator identity configuration
func (*Identities) Load ¶
func (i *Identities) Load() (err error)
Load loads the identity keypairs from files
type Log ¶
type Log struct {
// Level is the log level - one of "debug", "info", "warn", "error", "fatal", defaults to "info", overwritable by --log-level command line flag
Level string `koanf:"level"`
// Format is the log format - one of "text" or "json" or "logfmt", defaults to text
Format string `koanf:"format"`
// ParsedLevel is the parsed log level
ParsedLevel log.Level `koanf:"-"`
// ParsedFormat is the parsed log format
ParsedFormatter log.Formatter `koanf:"-"`
}
Log represents the logging configuration
func (*Log) ConfigureWithLevelString ¶
ConfigureWithLevelString configures the logger with the supplied settings If logLevel is provided and different from the config level, it overrides the config
func (*Log) SetLevelString ¶
SetLevelString sets the log level from a string
type Sync ¶
type Sync struct {
// EnabledWhenActive enables sync when the validator is active
EnabledWhenActive bool `koanf:"enabled_when_active"`
// EnabledWhenNoActiveLeaderInGossip enables sync when there is no active leader in gossip
EnabledWhenNoActiveLeaderInGossip bool `koanf:"enabled_when_no_active_leader_in_gossip"`
// EnableSFDPCompliance enables SFDP compliance checking
EnableSFDPCompliance bool `koanf:"enable_sfdp_compliance"`
// Commands are the commands to run when there is a version change
Commands []sync_commands.Command `koanf:"commands"`
}
Sync represents the version sync configuration
func (*Sync) SetDefaults ¶
func (s *Sync) SetDefaults()
SetDefaults sets default values for the sync configuration
type Validator ¶
type Validator struct {
// Client is the solana validator client - one of: agave, jito-solana, rakurai-validator, firedancer
// The legacy alias "rakurai" is also accepted and normalized to "rakurai-validator".
Client string `koanf:"client"`
// RPCURL is the URL of the validator's RPC endpoint
RPCURL string `koanf:"rpc_url"`
// VersionConstraint is the constraint for the client version
VersionConstraint string `koanf:"version_constraint"`
// Identities are the paths to the active and passive identity keyfiles
Identities Identities `koanf:"identities"`
}
Validator represents the validator configuration