generate

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

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.

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.

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 GenerateConfig

func GenerateConfig(path string) (err error)

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

func GenerateScripts

func GenerateScripts(gd GenerationData) (elPort, clPort string, 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

Types

type DockerComposeData

type DockerComposeData struct {
	TTD                 bool
	CcPrysmCfg          bool
	VlPrysmCfg          bool
	XeeVersion          bool
	Mev                 bool
	MevPort             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
	MapAllPorts         bool
	SplittedNetwork     bool
}

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
	KeystoreDir               string
}

EnvData : Struct Data object to be applied to the docker-compose script environment (.env) template

type GenerationData

type GenerationData struct {
	ExecutionClient   string
	ExecutionImage    string
	ExecutionEndpoint string
	ConsensusClient   string
	ConsensusImage    string
	ConsensusEndpoint string
	ValidatorClient   string
	ValidatorImage    string
	GenerationPath    string
	Network           string
	CheckpointSyncUrl string
	FeeRecipient      string
	JWTSecretPath     string
	FallbackELUrls    []string
	ElExtraFlags      []string
	ClExtraFlags      []string
	VlExtraFlags      []string
	MapAllPorts       bool
	Mev               bool
	Ports             map[string]string
}

GenerationData : Struct Data object for script's generation

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL