Documentation
¶
Index ¶
- func ValidateDefaults(Chain Chain, ChainName string) error
- func ValidateMetricDefaults(Params []ClientParam) error
- type Chain
- type ClientOption
- type ClientParam
- type Metrics
- type RocketPoolConfig
- func (config *RocketPoolConfig) GetGasLimit() (uint64, error)
- func (config *RocketPoolConfig) GetGasPrice() (*big.Int, error)
- func (config *RocketPoolConfig) GetSelectedEth1Client() *ClientOption
- func (config *RocketPoolConfig) GetSelectedEth2Client() *ClientOption
- func (config *RocketPoolConfig) Serialize() ([]byte, error)
- type UserParam
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateDefaults ¶ added in v1.0.0
Make sure the default parameter values can be parsed into the parameter types
func ValidateMetricDefaults ¶ added in v1.0.0
func ValidateMetricDefaults(Params []ClientParam) error
Make sure the default parameter values for the metrics section can be parsed into the parameter types
Types ¶
type Chain ¶
type Chain struct {
Provider string `yaml:"provider,omitempty"`
WsProvider string `yaml:"wsProvider,omitempty"`
ChainID string `yaml:"chainID,omitempty"`
Client struct {
Options []ClientOption `yaml:"options,omitempty"`
Selected string `yaml:"selected,omitempty"`
Params []UserParam `yaml:"params,omitempty"`
} `yaml:"client,omitempty"`
}
func (*Chain) GetClientById ¶ added in v1.0.0
func (chain *Chain) GetClientById(id string) *ClientOption
Get a client by it's ID
func (*Chain) GetSelectedClient ¶
func (chain *Chain) GetSelectedClient() *ClientOption
type ClientOption ¶
type ClientOption struct {
ID string `yaml:"id,omitempty"`
Name string `yaml:"name,omitempty"`
Desc string `yaml:"desc,omitempty"`
Image string `yaml:"image,omitempty"`
BeaconImage string `yaml:"beaconImage,omitempty"`
ValidatorImage string `yaml:"validatorImage,omitempty"`
Link string `yaml:"link,omitempty"`
CompatibleEth2Clients string `yaml:"compatibleEth2Clients,omitempty"`
EventLogInterval string `yaml:"eventLogInterval,omitempty"`
Supermajority bool `yaml:"supermajority,omitempty"`
Params []ClientParam `yaml:"params,omitempty"`
}
func (*ClientOption) GetBeaconImage ¶
func (client *ClientOption) GetBeaconImage() string
Get the beacon & validator images for a client
func (*ClientOption) GetValidatorImage ¶
func (client *ClientOption) GetValidatorImage() string
type ClientParam ¶
type ClientParam struct {
Name string `yaml:"name,omitempty"`
Desc string `yaml:"desc,omitempty"`
Env string `yaml:"env,omitempty"`
Required bool `yaml:"required,omitempty"`
Regex string `yaml:"regex,omitempty"`
Type string `yaml:"type,omitempty"`
Default string `yaml:"default,omitempty"`
Max string `yaml:"max,omitempty"`
BlankText string `yaml:"blankText,omitempty"`
}
type Metrics ¶ added in v1.0.0
type Metrics struct {
Enabled bool `yaml:"enabled,omitempty"`
Params []ClientParam `yaml:"params,omitempty"`
Settings []UserParam `yaml:"settings,omitempty"`
}
type RocketPoolConfig ¶
type RocketPoolConfig struct {
Rocketpool struct {
StorageAddress string `yaml:"storageAddress,omitempty"`
OneInchOracleAddress string `yaml:"oneInchOracleAddress,omitempty"`
RplTokenAddress string `yaml:"rplTokenAddress,omitempty"`
RPLFaucetAddress string `yaml:"rplFaucetAddress,omitempty"`
} `yaml:"rocketpool,omitempty"`
Smartnode struct {
ProjectName string `yaml:"projectName,omitempty"`
GraffitiVersion string `yaml:"graffitiVersion,omitempty"`
Image string `yaml:"image,omitempty"`
PasswordPath string `yaml:"passwordPath,omitempty"`
WalletPath string `yaml:"walletPath,omitempty"`
ValidatorKeychainPath string `yaml:"validatorKeychainPath,omitempty"`
ValidatorRestartCommand string `yaml:"validatorRestartCommand,omitempty"`
GasPrice string `yaml:"gasPrice,omitempty"`
GasLimit string `yaml:"gasLimit,omitempty"`
RplClaimGasThreshold string `yaml:"rplClaimGasThreshold,omitempty"`
TxWatchUrl string `yaml:"txWatchUrl,omitempty"`
StakeUrl string `yaml:"stakeUrl,omitempty"`
} `yaml:"smartnode,omitempty"`
Chains struct {
Eth1 Chain `yaml:"eth1,omitempty"`
Eth2 Chain `yaml:"eth2,omitempty"`
} `yaml:"chains,omitempty"`
Metrics Metrics `yaml:"metrics,omitempty"`
}
Rocket Pool config
func (*RocketPoolConfig) GetGasLimit ¶ added in v1.0.0
func (config *RocketPoolConfig) GetGasLimit() (uint64, error)
Parse and return the gas limit
func (*RocketPoolConfig) GetGasPrice ¶ added in v1.0.0
func (config *RocketPoolConfig) GetGasPrice() (*big.Int, error)
Parse and return the gas price in wei
func (*RocketPoolConfig) GetSelectedEth1Client ¶
func (config *RocketPoolConfig) GetSelectedEth1Client() *ClientOption
Get the selected clients from a config
func (*RocketPoolConfig) GetSelectedEth2Client ¶
func (config *RocketPoolConfig) GetSelectedEth2Client() *ClientOption
func (*RocketPoolConfig) Serialize ¶
func (config *RocketPoolConfig) Serialize() ([]byte, error)
Serialize a config to yaml bytes
Click to show internal directories.
Click to hide internal directories.