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.
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 ¶
var AllClients map[string][]string = map[string][]string{
"execution": {
"nethermind",
"geth",
"erigon",
"besu",
},
"consensus": {
"lighthouse",
"prysm",
"teku",
"lodestar",
"nimbus",
},
"validator": {
"lighthouse",
"prysm",
"teku",
"lodestar",
"nimbus",
},
"optimism": {
"opnode",
},
"opexecution": {
"opgeth",
"opnethermind",
"opreth",
},
}
var ErrEmptyClientsList = errors.New("empty clients list")
ErrEmptyClientsList is returned when the clients list is empty
Functions ¶
func RandomClientName ¶ added in v1.0.0
RandomClientName returns a random client name from a list of clients
func ValidateClient ¶
ValidateClient : Validate if the client is supported and configured
params :- a. client Client Client to be validated
returns :- a. error Error if client is not supported or configured
Types ¶
type Client ¶
Client : Struct Represent a client like geth, prysm, etc
func RandomChoice ¶
RandomChoice : Select a random supported client from a ClientMap
params :- a. clients ClientMap Target clients
returns :- a. Client Random element from list b. error Error if any
func (*Client) SetImageOrDefault ¶ added in v1.0.0
func (*Client) SetOpExecutionImage ¶ added in v1.7.1
type ClientInfo ¶
type ClientInfo struct {
Network string
}
ClientInfo : Struct Interface for listing available clients
func (ClientInfo) Clients ¶
func (c ClientInfo) Clients(clientTypes []string) (clients OrderedClients, errs []error)
Clients : Get all the supported clients for the ClientInfo's network
params :- a. clientTypes []string Types of client supported. E.g execution, consensus, validator
returns :- a. OrderedClients Map of <clientType>: map of <clientName>: Client b. []error List of errors
func (ClientInfo) SupportedClients ¶
func (c ClientInfo) SupportedClients(clientType string) (clientsNames []string, err error)
SupportedClients : Get supported client names of type <clientType> for the ClientInfo's network. A client is supported if it has a docker-compose service template
params :- a. clientType string Type of client to be returned
returns :- a. []string List of supported clients names of type <clientType> b. error Error if any
type Clients ¶
type Clients struct { Execution *Client Consensus *Client Validator *Client Optimism *Client ExecutionOP *Client }
Clients : Struct Represent a combination of execution, consensus and validator clients