Documentation ¶
Index ¶
- func AddParametersToEnvVars(params []*Parameter, envVars map[string]string)
- type ChangedSetting
- type Config
- type ConsensusClient
- type ConsensusConfig
- type ContainerID
- type ExecutionClient
- type ExternalConsensusConfig
- type LocalConsensusConfig
- type Mode
- type Network
- type Parameter
- func (param *Parameter) ChangeNetwork(oldNetwork Network, newNetwork Network)
- func (param *Parameter) Deserialize(serializedParams map[string]string, network Network) error
- func (param *Parameter) GetDefault(network Network) (interface{}, error)
- func (param *Parameter) Serialize(serializedParams map[string]string)
- func (param *Parameter) SetToDefault(network Network) error
- type ParameterOption
- type ParameterType
- type RewardsMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddParametersToEnvVars ¶
Add the parameters to the collection of environment variabes
Types ¶
type ChangedSetting ¶
type ChangedSetting struct { Name string OldValue string NewValue string AffectedContainers map[ContainerID]bool }
A setting that has changed
type ConsensusClient ¶
type ConsensusClient string
const ( ConsensusClient_Unknown ConsensusClient = "" ConsensusClient_Lighthouse ConsensusClient = "lighthouse" ConsensusClient_Nimbus ConsensusClient = "nimbus" ConsensusClient_Prysm ConsensusClient = "prysm" ConsensusClient_Teku ConsensusClient = "teku" )
Enum to describe the Consensus client options
type ConsensusConfig ¶
Interface for common Consensus configurations
type ContainerID ¶
type ContainerID string
const ( ContainerID_Unknown ContainerID = "" ContainerID_Api ContainerID = "api" ContainerID_Node ContainerID = "node" ContainerID_Watchtower ContainerID = "watchtower" ContainerID_Eth1 ContainerID = "eth1" ContainerID_Eth2 ContainerID = "eth2" ContainerID_Validator ContainerID = "validator" ContainerID_Grafana ContainerID = "grafana" ContainerID_Prometheus ContainerID = "prometheus" ContainerID_Exporter ContainerID = "exporter" ContainerID_MevBoost ContainerID = "mev-boost" )
Enum to describe which container(s) a parameter impacts, so the Smartnode knows which ones to restart upon a settings change
type ExecutionClient ¶
type ExecutionClient string
const ( ExecutionClient_Unknown ExecutionClient = "" ExecutionClient_Geth ExecutionClient = "geth" ExecutionClient_Nethermind ExecutionClient = "nethermind" ExecutionClient_Besu ExecutionClient = "besu" ExecutionClient_Obs_Infura ExecutionClient = "infura" ExecutionClient_Obs_Pocket ExecutionClient = "pocket" )
Enum to describe the Execution client options
type ExternalConsensusConfig ¶
type ExternalConsensusConfig interface {
GetApiUrl() string
}
Interface for External Consensus configurations
type LocalConsensusConfig ¶
type LocalConsensusConfig interface {
GetUnsupportedCommonParams() []string
}
Interface for Local Consensus configurations
type Parameter ¶
type Parameter struct { ID string `yaml:"id,omitempty"` Name string `yaml:"name,omitempty"` Description string `yaml:"description,omitempty"` Type ParameterType `yaml:"type,omitempty"` Default map[Network]interface{} `yaml:"default,omitempty"` MaxLength int `yaml:"maxLength,omitempty"` Regex string `yaml:"regex,omitempty"` Advanced bool `yaml:"advanced,omitempty"` AffectsContainers []ContainerID `yaml:"affectsContainers,omitempty"` EnvironmentVariables []string `yaml:"environmentVariables,omitempty"` CanBeBlank bool `yaml:"canBeBlank,omitempty"` OverwriteOnUpgrade bool `yaml:"overwriteOnUpgrade,omitempty"` Options []ParameterOption `yaml:"options,omitempty"` Value interface{} `yaml:"-"` }
A parameter that can be configured by the user
func (*Parameter) ChangeNetwork ¶
Apply a network change to a parameter
func (*Parameter) Deserialize ¶
Deserializes a map of settings into this parameter
func (*Parameter) GetDefault ¶
Get the default value for the provided network
func (*Parameter) SetToDefault ¶
Set the value to the default for the provided config's network
type ParameterOption ¶
type ParameterOption struct { Name string `yaml:"name,omitempty"` Description string `yaml:"description,omitempty"` Value interface{} `yaml:"value,omitempty"` }
A single option in a choice parameter
type ParameterType ¶
type ParameterType string
const ( ParameterType_Unknown ParameterType = "" ParameterType_Int ParameterType = "int" ParameterType_Uint16 ParameterType = "uint16" ParameterType_Uint ParameterType = "uint" ParameterType_String ParameterType = "string" ParameterType_Bool ParameterType = "bool" ParameterType_Choice ParameterType = "choice" ParameterType_Float ParameterType = "float" )
Enum to describe which data type a parameter's value will have, which informs the corresponding UI element and value validation
type RewardsMode ¶
type RewardsMode string
const ( RewardsMode_Unknown RewardsMode = "" RewardsMode_Download RewardsMode = "download" RewardsMode_Generate RewardsMode = "generate" )
Enum to describe the rewards tree acquisition modes