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.
Index ¶
- Constants
- func GetEndpoints(clusterInfo *rpcpb.ClusterInfo) []string
- func SetDefaultSnapshot(snapshotsDir string, force bool) error
- type LocalSubnetDeployer
- func (d *LocalSubnetDeployer) BackendStartedHere() bool
- func (d *LocalSubnetDeployer) DeployToLocalNetwork(chain string, chainGenesis []byte, genesisPath string) (ids.ID, ids.ID, error)
- func (d *LocalSubnetDeployer) SetupLocalEnv() (string, string, error)
- func (d *LocalSubnetDeployer) StartServer() error
- func (d *LocalSubnetDeployer) WaitForHealthy(ctx context.Context, cli client.Client, healthCheckInterval time.Duration) (*rpcpb.ClusterInfo, error)
- type PublicDeployer
Constants ¶
const (
WriteReadReadPerms = 0o644
)
Variables ¶
This section is empty.
Functions ¶
func GetEndpoints ¶ added in v0.1.4
func GetEndpoints(clusterInfo *rpcpb.ClusterInfo) []string
GetEndpoints get a human readable list of endpoints from clusterinfo
func SetDefaultSnapshot ¶ added in v0.1.4
Initialize default snapshot with bootstrap snapshot archive If force flag is set to true, overwrite the default snapshot if it exists
Types ¶
type LocalSubnetDeployer ¶ added in v0.2.0
type LocalSubnetDeployer struct {
// contains filtered or unexported fields
}
func NewLocalSubnetDeployer ¶
func NewLocalSubnetDeployer(app *application.Avalanche) *LocalSubnetDeployer
func (*LocalSubnetDeployer) BackendStartedHere ¶ added in v0.2.0
func (d *LocalSubnetDeployer) BackendStartedHere() bool
BackendStartedHere returns true if the backend was started by this run, or false if it found it there already
func (*LocalSubnetDeployer) DeployToLocalNetwork ¶ added in v0.2.0
func (d *LocalSubnetDeployer) DeployToLocalNetwork(chain string, chainGenesis []byte, genesisPath string) (ids.ID, ids.ID, error)
DeployToLocalNetwork does the heavy lifting: * it checks the gRPC is running, if not, it starts it * kicks off the actual deployment
func (*LocalSubnetDeployer) SetupLocalEnv ¶ added in v0.2.0
func (d *LocalSubnetDeployer) SetupLocalEnv() (string, string, error)
SetupLocalEnv also does some heavy lifting: * sets up default snapshot if not installed * checks if avalanchego is installed in the local binary path * if not, it downloads it and installs it (os - and archive dependent) * returns the location of the avalanchego path and plugin
func (*LocalSubnetDeployer) StartServer ¶ added in v0.2.0
func (d *LocalSubnetDeployer) StartServer() error
func (*LocalSubnetDeployer) WaitForHealthy ¶ added in v0.2.0
func (d *LocalSubnetDeployer) WaitForHealthy( ctx context.Context, cli client.Client, healthCheckInterval time.Duration, ) (*rpcpb.ClusterInfo, error)
WaitForHealthy polls continuously until the network is ready to be used
type PublicDeployer ¶ added in v0.2.0
type PublicDeployer struct { LocalSubnetDeployer // contains filtered or unexported fields }
func NewPublicDeployer ¶ added in v0.2.0
func NewPublicDeployer(app *application.Avalanche, privKeyPath string, network models.Network) *PublicDeployer