subnet

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2022 License: BSD-3-Clause Imports: 39 Imported by: 0

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.

Index

Constants

View Source
const (
	WriteReadReadPerms = 0o644
)

Variables

This section is empty.

Functions

func GetEndpoints

func GetEndpoints(clusterInfo *rpcpb.ClusterInfo) []string

GetEndpoints get a human readable list of endpoints from clusterinfo

func SetDefaultSnapshot

func SetDefaultSnapshot(snapshotsDir string, force bool) error

Initialize default snapshot with bootstrap snapshot archive If force flag is set to true, overwrite the default snapshot if it exists

Types

type LocalDeployer

type LocalDeployer struct {
	// contains filtered or unexported fields
}

func NewLocalDeployer

func NewLocalDeployer(app *application.Avalanche, avagoVersion string, vmBin string) *LocalDeployer

func (*LocalDeployer) BackendStartedHere

func (d *LocalDeployer) BackendStartedHere() bool

BackendStartedHere returns true if the backend was started by this run, or false if it found it there already

func (*LocalDeployer) DeployToLocalNetwork

func (d *LocalDeployer) 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 (*LocalDeployer) SetupLocalEnv

func (d *LocalDeployer) 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 (*LocalDeployer) StartServer

func (d *LocalDeployer) StartServer() error

func (*LocalDeployer) WaitForHealthy

func (d *LocalDeployer) 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

type PublicDeployer struct {
	LocalDeployer
	// contains filtered or unexported fields
}

func NewPublicDeployer

func NewPublicDeployer(app *application.Avalanche, privKeyPath string, network models.Network) *PublicDeployer

func (*PublicDeployer) AddValidator

func (d *PublicDeployer) AddValidator(subnet ids.ID, nodeID ids.NodeID, weight uint64, startTime time.Time, duration time.Duration) error

func (*PublicDeployer) Deploy

func (d *PublicDeployer) Deploy(controlKeys []string, threshold uint32, chain string, genesis []byte) (ids.ID, ids.ID, error)

type Publisher

type Publisher interface {
	Publish(r *git.Repository, subnetName, vmName string, subnetYAML []byte, vmYAML []byte) error
	GetRepo() (*git.Repository, error)
}

func NewPublisher

func NewPublisher(repoDir, repoURL, alias string) Publisher

Jump to

Keyboard shortcuts

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