Documentation
¶
Overview ¶
Copyright (C) 2022, Ava Labs, Inc. All rights reserved. See the file LICENSE for licensing terms.
Index ¶
- Variables
- func BeaconMapFromSet(beaconSet beacon.Set) (map[ids.NodeID]netip.AddrPort, error)
- func BeaconMapToSet(beaconMap map[ids.NodeID]netip.AddrPort) (beacon.Set, error)
- func CheckExecPath(exec string) error
- func CheckPluginPath(pluginExec string) error
- func ColorAndPrepend(reader io.Reader, writer io.Writer, prependText string, color logging.Color)
- func CombineJSONs(baseJSON string, addedJSON string) (string, error)
- func DirnameWithTimestamp(dirPrefix string) string
- func FileExists(filename string) bool
- func GenerateGenesis(networkID uint32, nodeKeys []*NodeKeys) ([]byte, error)
- func IsCustomNetwork(networkID uint32) bool
- func IsInsideDockerContainer() (bool, error)
- func IsPublicNetwork(networkID uint32) bool
- func MkDirWithTimestamp(dirPrefix string) (string, error)
- func NetworkIDFromGenesis(genesis []byte) (uint32, error)
- func NewColorPicker() *colorPicker
- func PathExists(path string) (bool, error)
- func SetGenesisNetworkID(genesis []byte, networkID uint32) ([]byte, error)
- func SetJSONKey(jsonBody string, k string, v string) (string, error)
- func ToNodeID(stakingKey, stakingCert []byte) (ids.NodeID, error)
- func VMID(vmName string) (ids.ID, error)
- func VerifySubnetHasCorrectParticipants(log logging.Logger, subnetParticipants []string, cluster *rpcb.ClusterInfo, ...) bool
- func WaitForFile(filename string, timeout time.Duration, checkInterval time.Duration, ...) error
- type ColorPicker
- type EncodedNodeKeys
- type NodeKeys
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEmptyExecPath = errors.New("the path to the avalanchego executable is not defined. please make sure to either set the AVALANCHEGO_EXEC_PATH environment variable or pass the path with the --avalanchego-path flag") ErrNotExists = errors.New("the avalanchego executable does not exists at the provided path") ErrNotExistsPlugin = errors.New("the vm plugin does not exists at the provided path. please check if the plugin path is set correctly in the AVALANCHEGO_PLUGIN_PATH environment variable or the --plugin-dir flag and if the plugin binary is located there") ErrorNoNetworkIDKey = fmt.Errorf("couldn't find key %q in genesis", genesisNetworkIDKey) )
Functions ¶
func BeaconMapFromSet ¶ added in v1.9.0
func BeaconMapToSet ¶ added in v1.9.0
func CheckExecPath ¶
func CheckPluginPath ¶ added in v1.5.0
func ColorAndPrepend ¶
ColorAndPrepend reads each line from [reader], prepends it with [prependText] and colors it with [color], and then prints the prepended/colored line to [writer].
func CombineJSONs ¶ added in v1.9.0
func DirnameWithTimestamp ¶ added in v1.9.0
func FileExists ¶ added in v1.9.0
FileExists checks if a file exists.
func GenerateGenesis ¶ added in v1.9.0
func IsCustomNetwork ¶ added in v1.9.0
func IsInsideDockerContainer ¶ added in v1.9.0
func IsPublicNetwork ¶ added in v1.9.0
func MkDirWithTimestamp ¶
func NetworkIDFromGenesis ¶
Returns the network ID in the given genesis
func NewColorPicker ¶
func NewColorPicker() *colorPicker
NewColorPicker allows to assign a color to different clients
func PathExists ¶ added in v1.9.0
func SetGenesisNetworkID ¶ added in v1.9.0
func SetJSONKey ¶
Set k=v in JSON string e.g., "track-subnets" is the key and value is "a,b,c".
func VerifySubnetHasCorrectParticipants ¶ added in v1.4.1
Types ¶
type ColorPicker ¶
ColorPicker allows to assign a new color
type EncodedNodeKeys ¶ added in v1.9.0
func EncodeNodeKeys ¶ added in v1.9.0
func EncodeNodeKeys(key *NodeKeys) *EncodedNodeKeys
Click to show internal directories.
Click to hide internal directories.