Documentation
¶
Overview ¶
Copyright (C) 2022, Ava Labs, Inc. All rights reserved. See the file LICENSE for licensing terms.
Copyright (C) 2022, Ava Labs, Inc. All rights reserved. See the file LICENSE for licensing terms.
Copyright (C) 2022, Ava Labs, Inc. All rights reserved. See the file LICENSE for licensing terms.
Copyright (C) 2022, Ava Labs, Inc. All rights reserved. See the file LICENSE for licensing terms.
Copyright (C) 2023, Ava Labs, Inc. All rights reserved. See the file LICENSE for licensing terms.
Copyright (C) 2022, Ava Labs, Inc. All rights reserved. See the file LICENSE for licensing terms.
Copyright (C) 2022, Ava Labs, Inc. All rights reserved. See the file LICENSE for licensing terms.
Copyright (C) 2022, Ava Labs, Inc. All rights reserved. See the file LICENSE for licensing terms.
Copyright (C) 2022, Ava Labs, Inc. All rights reserved. See the file LICENSE for licensing terms.
Copyright (C) 2022, Ava Labs, Inc. All rights reserved. See the file LICENSE for licensing terms.
Index ¶
- Constants
- Variables
- func HostAnsibleIDToCloudID(hostAnsibleID string) (string, string, error)
- func HostCloudIDToAnsibleID(cloudService string, hostCloudID string) (string, error)
- func NewHostConnection(h *Host, port uint) (*goph.Client, error)
- type AvagoCompatiblity
- type CloudConfig
- type ClusterConfig
- func (cc *ClusterConfig) GetAPIHosts(hosts []*Host) []*Host
- func (cc *ClusterConfig) GetCloudIDs() []string
- func (cc *ClusterConfig) GetHostRoles(nodeConf NodeConfig) []string
- func (cc *ClusterConfig) GetValidatorHosts(hosts []*Host) []*Host
- func (cc *ClusterConfig) IsAPIHost(hostCloudID string) bool
- func (cc *ClusterConfig) IsAvalancheGoHost(hostCloudID string) bool
- type ClustersConfig
- type ClustersConfigV0
- type ElasticSubnet
- type ElasticSubnetConfig
- type Exportable
- type ExtraNetworkData
- type GCPConfig
- type Host
- func (h *Host) Command(script string, env []string, timeout time.Duration) ([]byte, error)
- func (h *Host) Connect(port uint) error
- func (h *Host) Connected() bool
- func (h *Host) Disconnect() error
- func (h *Host) Download(remoteFile string, localFile string, timeout time.Duration) error
- func (h *Host) Forward(httpRequest string, timeout time.Duration) ([]byte, error)
- func (h *Host) GetAnsibleInventoryRecord() string
- func (h *Host) GetCloudID() string
- func (h *Host) MkdirAll(remoteDir string, timeout time.Duration) error
- func (h *Host) StreamSSHCommand(command string, env []string, timeout time.Duration) error
- func (h *Host) UntimedForward(httpRequest string) ([]byte, error)
- func (h *Host) UntimedMkdirAll(remoteDir string) error
- func (h *Host) Upload(localFile string, remoteFile string, timeout time.Duration) error
- func (h *Host) WaitForSSHPort(port uint, timeout time.Duration) error
- func (h *Host) WaitForSSHShell(timeout time.Duration) error
- type Network
- func NetworkFromNetworkID(networkID uint32) Network
- func NewDevnetNetwork(endpoint string, id uint32) Network
- func NewLocalNetwork() Network
- func NewMainnetNetwork() Network
- func NewNetwork(kind NetworkKind, id uint32, endpoint string, clusterName string) Network
- func NewNetworkFromCluster(n Network, clusterName string) Network
- func NewTahoeNetwork() Network
- func (n Network) BlockchainEndpoint(blockchainID string) string
- func (n Network) BlockchainWSEndpoint(blockchainID string) string
- func (n Network) CChainEndpoint() string
- func (n Network) CChainWSEndpoint() string
- func (n Network) GenesisParams() *genesis.Params
- func (n *Network) HandlePublicNetworkSimulation()
- func (n Network) Name() string
- func (n Network) NetworkIDFlagValue() string
- type NetworkData
- type NetworkKind
- type NodeConfig
- type NodeResult
- type NodeResults
- func (nr *NodeResults) AddResult(nodeID string, value interface{}, err error)
- func (nr *NodeResults) GetErrorHostMap() map[string]error
- func (nr *NodeResults) GetErrorHosts() []string
- func (nr *NodeResults) GetNodeList() []string
- func (nr *NodeResults) GetResultMap() map[string]interface{}
- func (nr *NodeResults) GetResults() []NodeResult
- func (nr *NodeResults) HasErrors() bool
- func (nr *NodeResults) HasNodeIDWithError(nodeID string) bool
- func (nr *NodeResults) Len() int
- type PermissionlessValidators
- type RegionConfig
- type Sidecar
- type VMCompatibility
- type VMType
Constants ¶
const ( SubnetEvm = "Subnet-EVM" BlobVM = "Blob VM" TimestampVM = "Timestamp VM" CustomVM = "Custom" )
Variables ¶
var UndefinedNetwork = Network{}
Functions ¶
func HostAnsibleIDToCloudID ¶
HostAnsibleIDToCloudID converts a host Ansible ID to a cloud ID.
func HostCloudIDToAnsibleID ¶
Types ¶
type AvagoCompatiblity ¶
type CloudConfig ¶
type CloudConfig map[string]RegionConfig
func (*CloudConfig) GetAPIInstanceIDsForRegion ¶
func (ccm *CloudConfig) GetAPIInstanceIDsForRegion(region string) []string
GetAPIInstanceIDsForRegion returns API instance IDs for specific region
func (*CloudConfig) GetAllInstanceIDs ¶
func (ccm *CloudConfig) GetAllInstanceIDs() []string
GetAllInstanceIDs returns all instance IDs
func (*CloudConfig) GetInstanceIDsForRegion ¶
func (ccm *CloudConfig) GetInstanceIDsForRegion(region string) []string
GetInstanceIDsForRegion returns instance IDs for specific region
func (*CloudConfig) GetRegions ¶
func (ccm *CloudConfig) GetRegions() []string
GetRegions returns a slice of strings representing the regions of the RegionConfig.
type ClusterConfig ¶
type ClusterConfig struct {
Nodes []string
APINodes []string
Network Network
MonitoringInstance string // instance ID of the separate monitoring instance (if any)
LoadTestInstance map[string]string // maps load test name to load test cloud instance ID of the separate load test instance (if any)
ExtraNetworkData ExtraNetworkData
Subnets []string
}
func (*ClusterConfig) GetAPIHosts ¶
func (cc *ClusterConfig) GetAPIHosts(hosts []*Host) []*Host
GetAPINodes returns a filtered list of API nodes based on the ClusterConfig and given hosts.
func (*ClusterConfig) GetCloudIDs ¶
func (cc *ClusterConfig) GetCloudIDs() []string
func (*ClusterConfig) GetHostRoles ¶
func (cc *ClusterConfig) GetHostRoles(nodeConf NodeConfig) []string
func (*ClusterConfig) GetValidatorHosts ¶
func (cc *ClusterConfig) GetValidatorHosts(hosts []*Host) []*Host
GetValidatorNodes returns the validator nodes from the ClusterConfig.
func (*ClusterConfig) IsAPIHost ¶
func (cc *ClusterConfig) IsAPIHost(hostCloudID string) bool
func (*ClusterConfig) IsAvalancheGoHost ¶
func (cc *ClusterConfig) IsAvalancheGoHost(hostCloudID string) bool
type ClustersConfig ¶
type ClustersConfigV0 ¶
type ElasticSubnet ¶
type ElasticSubnetConfig ¶
type ElasticSubnetConfig struct {
SubnetID ids.ID
AssetID ids.ID
InitialSupply uint64
MaxSupply uint64
MinConsumptionRate uint64
MaxConsumptionRate uint64
MinValidatorStake uint64
MaxValidatorStake uint64
MinStakeDuration time.Duration
MaxStakeDuration time.Duration
MinDelegationFee uint32
MinDelegatorStake uint64
MaxValidatorWeightFactor byte
UptimeRequirement uint32
}
type Exportable ¶
type ExtraNetworkData ¶
type Host ¶
type Host struct {
NodeID string
IP string
SSHUser string
SSHPrivateKeyPath string
SSHCommonArgs string
Connection *goph.Client
}
func (*Host) Disconnect ¶
func (*Host) GetAnsibleInventoryRecord ¶
func (*Host) GetCloudID ¶
GetCloudID returns the node ID of the host.
func (*Host) StreamSSHCommand ¶
StreamSSHCommand streams the execution of an SSH command on the host.
func (*Host) UntimedForward ¶
UntimedForward forwards the TCP connection to a remote address. Does not support timeouts on the operation.
func (*Host) UntimedMkdirAll ¶
UntimedMkdirAll creates a folder on the remote server. Does not support timeouts on the operation.
func (*Host) WaitForSSHPort ¶
WaitForSSHPort waits for the SSH port to become available on the host.
type Network ¶
type Network struct {
Kind NetworkKind
ID uint32
Endpoint string
ClusterName string
}
func NetworkFromNetworkID ¶
func NewDevnetNetwork ¶
func NewLocalNetwork ¶
func NewLocalNetwork() Network
func NewMainnetNetwork ¶
func NewMainnetNetwork() Network
func NewNetwork ¶
func NewNetwork(kind NetworkKind, id uint32, endpoint string, clusterName string) Network
func NewNetworkFromCluster ¶
func NewTahoeNetwork ¶
func NewTahoeNetwork() Network
func (Network) BlockchainEndpoint ¶
func (Network) BlockchainWSEndpoint ¶
func (Network) CChainEndpoint ¶
func (Network) CChainWSEndpoint ¶
func (Network) GenesisParams ¶
func (*Network) HandlePublicNetworkSimulation ¶
func (n *Network) HandlePublicNetworkSimulation()
func (Network) NetworkIDFlagValue ¶
type NetworkData ¶
type NetworkKind ¶
type NetworkKind int64
const ( Undefined NetworkKind = iota Mainnet Tahoe Local Devnet )
func (NetworkKind) String ¶
func (nk NetworkKind) String() string
type NodeConfig ¶
type NodeConfig struct {
NodeID string // instance id on cloud server
Region string // region where cloud server instance is deployed
AMI string // image id for cloud server dependent on its os (e.g. ubuntu )and region deployed (e.g. us-east-1)
KeyPair string // key pair name used on cloud server
CertPath string // where the cert is stored in user's local machine ssh directory
SecurityGroup string // security group used on cloud server
ElasticIP string // public IP address of the cloud server
CloudService string // which cloud service node is hosted on (AWS / GCP)
UseStaticIP bool // node has a static IP association
IsMonitor bool // node has a monitoring dashboard
IsAWMRelayer bool // node has an AWM relayer service
IsLoadTest bool // node is used to host load test
}
type NodeResult ¶
type NodeResults ¶
type NodeResults struct {
Results []NodeResult
Lock sync.Mutex
}
func (*NodeResults) AddResult ¶
func (nr *NodeResults) AddResult(nodeID string, value interface{}, err error)
func (*NodeResults) GetErrorHostMap ¶
func (nr *NodeResults) GetErrorHostMap() map[string]error
func (*NodeResults) GetErrorHosts ¶
func (nr *NodeResults) GetErrorHosts() []string
func (*NodeResults) GetNodeList ¶
func (nr *NodeResults) GetNodeList() []string
func (*NodeResults) GetResultMap ¶
func (nr *NodeResults) GetResultMap() map[string]interface{}
func (*NodeResults) GetResults ¶
func (nr *NodeResults) GetResults() []NodeResult
func (*NodeResults) HasErrors ¶
func (nr *NodeResults) HasErrors() bool
func (*NodeResults) HasNodeIDWithError ¶
func (nr *NodeResults) HasNodeIDWithError(nodeID string) bool
func (*NodeResults) Len ¶
func (nr *NodeResults) Len() int
type RegionConfig ¶
type Sidecar ¶
type Sidecar struct {
Name string
VM VMType
VMVersion string
RPCVersion int
Subnet string
TokenName string
TokenSymbol string
ChainID string
Version string
Networks map[string]NetworkData
ElasticSubnet map[string]ElasticSubnet
ImportedFromAPM bool
ImportedVMID string
CustomVMRepoURL string
CustomVMBranch string
CustomVMBuildScript string
// Teleporter related
TeleporterReady bool
TeleporterKey string
TeleporterVersion string
RunRelayer bool
// SubnetEVM based VM's only
SubnetEVMMainnetChainID uint
}