networkoptions

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Overview

Copyright (C) 2022, Ava Labs, Inc. All rights reserved. See the file LICENSE for licensing terms.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddNetworkFlagsToCmd

func AddNetworkFlagsToCmd(cmd *cobra.Command, networkFlags *NetworkFlags, alwaysAddEndpoint bool, supportedNetworkOptions []NetworkOption)

func GetNetworkFromCmdLineFlags

func GetNetworkFromCmdLineFlags(
	app *application.Avalanche,
	networkFlags NetworkFlags,
	requireDevnetEndpointSpecification bool,
	supportedNetworkOptions []NetworkOption,
	subnetName string,
) (models.Network, error)

func GetNetworkFromSidecarNetworkName

func GetNetworkFromSidecarNetworkName(
	app *application.Avalanche,
	networkName string,
) (models.Network, error)

Types

type NetworkFlags

type NetworkFlags struct {
	UseLocal    bool
	UseDevnet   bool
	UseTahoe    bool
	UseMainnet  bool
	Endpoint    string
	ClusterName string
}

type NetworkOption

type NetworkOption int64
const (
	Undefined NetworkOption = iota
	Mainnet
	Tahoe
	Local
	Devnet
	Cluster
)

func GetSupportedNetworkOptionsForSubnet

func GetSupportedNetworkOptionsForSubnet(
	app *application.Avalanche,
	subnetName string,
	supportedNetworkOptions []NetworkOption,
) ([]NetworkOption, []string, []string, error)

func (NetworkOption) String

func (n NetworkOption) String() string

Jump to

Keyboard shortcuts

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