env

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 6 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

View Source
var (
	ReMEV         = regexp.MustCompile(`MEV=(.*)`)
	ReXEEV        = regexp.MustCompile(`XEE_VERSION=(.*)`)
	ReClBOOTNODES = regexp.MustCompile(`CC_BOOTNODES=(.*)`)
	ReElBOOTNODES = regexp.MustCompile(`EC_BOOTNODES=(.*)`)
	ReCHECKPOINT  = regexp.MustCompile(`CHECKPOINT_SYNC_URL=(.*)`)
	ReSPLITTED    = regexp.MustCompile(`EL_NETWORK=(.*)`)
)

Functions

func CheckVariable

func CheckVariable(re *regexp.Regexp, network, clientType, client string) (bool, error)

CheckVariable : Check whatever a variable exist in the base .env template file.

params :- a. re regexp.Regexp Regular expression to be used for matchings b. network string Target network c. clientType string Type of the client, e.g execution, consensus, validator d. client string Client's name

returns :- a. bool True if variable exists in <client>'s .env template for <network> b. error Error if any

func CheckVariableBase

func CheckVariableBase(re *regexp.Regexp, network string) (bool, error)

CheckVariableBase : Check whatever a variable exist in the base .env template file.

params :- a. re regexp.Regexp Regular expression to be used for matchings b. network string Target network

returns :- a. bool True if variable exists in base .env template for <network> b. error Error if any

func GetCCBootnodes added in v1.0.0

func GetCCBootnodes(envFilePath string) ([]string, error)

GetCCBootnodes : Get the consensus bootnodes (list of enr addresses) from the environment variables in .env.

params :- a. path to generated env file

returns :- a. []string List of bootnodes b. error Error if any

func GetECBootnodes added in v1.0.0

func GetECBootnodes(envFilePath string) ([]string, error)

GetECBootnodes : Get the execution bootnodes (list of enodes addresses) from the environment variables in .env.

params :- a. path to generated env file

returns :- a. []string List of bootnodes b. error Error if any

Types

This section is empty.

Jump to

Keyboard shortcuts

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