Documentation ¶
Overview ¶
Copyright 2022 Nethermind
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2022 Nethermind ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2022 Nethermind ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanDockerCompose ¶ added in v0.3.0
CleanDockerCompose This functions is responsible for the process of cleaning a generated docker compose script.
params :- a. dockerComposePath string Path of the docker compose file to clean
returns :- a. error Error if any
func CleanEnvFile ¶ added in v0.3.0
CleanEnvFile This functions is resposible for the process of cleaning a generated `.env` file. It removes the duplicated env var in the file keeping only the latest apparititon of it.
params :- a. envFilePath string Path of the generated `.env` file
returns :- a. error Error if any
func CleanGenerated ¶ added in v0.3.0
func CleanGenerated(gr GenerationResults) error
CleanGenerated This functions handles the process of cleaning the generation results files
params :- a. gr GenerationResults The generations results to be cleaned
returns:- a. error Error if any
func GenerateConfig ¶
GenerateConfig : This function is responsible for generating the default configuration file containing all supported clients.
params :- a. path string Path of generated config file
returns :- a. error Error if any
Types ¶
type DockerComposeData ¶
type DockerComposeData struct { TTD bool CcCustomCfg bool CcRemoteCfg bool CcRemoteGen bool CcRemoteDpl bool VlCustomCfg bool VlRemoteCfg bool VlRemoteGen bool VlRemoteDpl bool XeeVersion bool Mev bool MevPort string MevImage string CheckpointSyncUrl string FeeRecipient string ElDiscoveryPort string ElMetricsPort string ElApiPort string ElAuthPort string ElWsPort string ClDiscoveryPort string ClMetricsPort string ClApiPort string ClAdditionalApiPort string VlMetricsPort string FallbackELUrls []string ElExtraFlags []string ClExtraFlags []string VlExtraFlags []string Bootnodes []string MapAllPorts bool SplittedNetwork bool ClCheckpointSyncUrl bool LoggingDriver string }
DockerComposeData : Struct Data object to be applied to docker-compose script
type EnvData ¶
type EnvData struct { ElImage string ElDataDir string CcImage string CcDataDir string VlImage string VlDataDir string ExecutionApiURL string ExecutionAuthURL string ConsensusApiURL string ConsensusAdditionalApiURL string FeeRecipient string JWTSecretPath string ExecutionEngineName string ConsensusClientName string KeystoreDir string Graffiti string }
EnvData : Struct Data object to be applied to the docker-compose script environment (.env) template
type GenerationData ¶
type GenerationData struct { ExecutionClient clients.Client ConsensusClient clients.Client ValidatorClient clients.Client GenerationPath string Network string CheckpointSyncUrl string FeeRecipient string JWTSecretPath string FallbackELUrls []string ElExtraFlags []string ClExtraFlags []string VlExtraFlags []string MapAllPorts bool Mev bool MevImage string Ports map[string]string Graffiti string LoggingDriver string }
GenerationData : Struct Data object for script's generation
type GenerationResults ¶ added in v0.3.0
type GenerationResults struct { DockerComposePath string EnvFilePath string ELPort string CLPort string }
GenerationResults: Struct for storing results of the generation process
func GenerateScripts ¶
func GenerateScripts(gd GenerationData) (result GenerationResults, err error)
GenerateScripts : This function is responsible for generating docker-compose files for execution, consensus and validator clients.
params :- a. gd GenerationData Data object containing clients whose script are to be generated, path of generated scripts and special options for the clients configuration.
returns :- a. string Execution client json-rpc API port b. string Consensus client HTTP API port a. error Error if any