application

package
v0.0.0-...-d0c3903 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2023 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Overview

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

This section is empty.

Types

type Avalanche

type Avalanche struct {
	Log logging.Logger

	Conf       *config.Config
	Prompt     prompts.Prompter
	Apm        *apm.APM
	ApmDir     string
	Downloader Downloader
	// contains filtered or unexported fields
}

func New

func New() *Avalanche

func (*Avalanche) CopyGenesisFile

func (app *Avalanche) CopyGenesisFile(inputFilename string, subnetName string) error

func (*Avalanche) CopyKeyFile

func (app *Avalanche) CopyKeyFile(inputFilename string, keyName string) error

func (*Avalanche) CopyVMBinary

func (app *Avalanche) CopyVMBinary(inputFilename string, subnetName string) error

func (*Avalanche) CreateSidecar

func (app *Avalanche) CreateSidecar(sc *models.Sidecar) error

func (*Avalanche) GenesisExists

func (app *Avalanche) GenesisExists(subnetName string) bool

func (*Avalanche) GetAPMBaseDir

func (app *Avalanche) GetAPMBaseDir() string

func (*Avalanche) GetAPMLog

func (app *Avalanche) GetAPMLog() string

func (*Avalanche) GetAPMPluginDir

func (app *Avalanche) GetAPMPluginDir() string

func (*Avalanche) GetAPMVMPath

func (app *Avalanche) GetAPMVMPath(vmid string) string

func (*Avalanche) GetAvalanchegoBinDir

func (app *Avalanche) GetAvalanchegoBinDir() string

func (*Avalanche) GetAvalanchegoCompatibilityURL

func (*Avalanche) GetAvalanchegoCompatibilityURL() string

func (*Avalanche) GetBaseDir

func (app *Avalanche) GetBaseDir() string

func (*Avalanche) GetCustomVMDir

func (app *Avalanche) GetCustomVMDir() string

func (*Avalanche) GetCustomVMPath

func (app *Avalanche) GetCustomVMPath(subnetName string) string

func (*Avalanche) GetDownloader

func (app *Avalanche) GetDownloader() Downloader

func (*Avalanche) GetGenesisPath

func (app *Avalanche) GetGenesisPath(subnetName string) string

func (*Avalanche) GetKeyDir

func (app *Avalanche) GetKeyDir() string

func (*Avalanche) GetKeyPath

func (app *Avalanche) GetKeyPath(keyName string) string

func (*Avalanche) GetPluginsDir

func (app *Avalanche) GetPluginsDir() string

func (*Avalanche) GetReposDir

func (app *Avalanche) GetReposDir() string

func (*Avalanche) GetRunDir

func (app *Avalanche) GetRunDir() string

func (*Avalanche) GetRunFile

func (app *Avalanche) GetRunFile() string

func (*Avalanche) GetSidecarNames

func (app *Avalanche) GetSidecarNames() ([]string, error)

func (*Avalanche) GetSidecarPath

func (app *Avalanche) GetSidecarPath(subnetName string) string

func (*Avalanche) GetSnapshotsDir

func (app *Avalanche) GetSnapshotsDir() string

func (*Avalanche) GetSpacesVMBinDir

func (app *Avalanche) GetSpacesVMBinDir() string

func (*Avalanche) GetSubnetDir

func (app *Avalanche) GetSubnetDir() string

func (*Avalanche) GetSubnetEVMBinDir

func (app *Avalanche) GetSubnetEVMBinDir() string

func (*Avalanche) GetTmpPluginDir

func (*Avalanche) GetTmpPluginDir() string

func (*Avalanche) GetTokenName

func (app *Avalanche) GetTokenName(subnetName string) string

func (*Avalanche) GetUpgradeBytesFilePath

func (app *Avalanche) GetUpgradeBytesFilePath(subnetName string) string

func (*Avalanche) GetUpgradeBytesFilepath

func (app *Avalanche) GetUpgradeBytesFilepath(subnetName string) string

func (*Avalanche) KeyExists

func (app *Avalanche) KeyExists(keyName string) bool

func (*Avalanche) LoadEvmGenesis

func (app *Avalanche) LoadEvmGenesis(subnetName string) (core.Genesis, error)

func (*Avalanche) LoadRawGenesis

func (app *Avalanche) LoadRawGenesis(subnetName string) ([]byte, error)

func (*Avalanche) LoadSidecar

func (app *Avalanche) LoadSidecar(subnetName string) (models.Sidecar, error)

func (*Avalanche) ReadLockUpgradeFile

func (app *Avalanche) ReadLockUpgradeFile(subnetName string) ([]byte, error)

func (*Avalanche) ReadUpgradeFile

func (app *Avalanche) ReadUpgradeFile(subnetName string) ([]byte, error)

func (*Avalanche) Setup

func (app *Avalanche) Setup(baseDir string, log logging.Logger, conf *config.Config, prompt prompts.Prompter, downloader Downloader)

func (*Avalanche) SidecarExists

func (app *Avalanche) SidecarExists(subnetName string) bool

func (*Avalanche) SubnetConfigExists

func (app *Avalanche) SubnetConfigExists(subnetName string) bool

func (*Avalanche) UpdateSidecar

func (app *Avalanche) UpdateSidecar(sc *models.Sidecar) error

func (*Avalanche) UpdateSidecarNetworks

func (app *Avalanche) UpdateSidecarNetworks(
	sc *models.Sidecar,
	network models.Network,
	subnetID ids.ID,
	blockchainID ids.ID,
) error

func (*Avalanche) WriteGenesisFile

func (app *Avalanche) WriteGenesisFile(subnetName string, genesisBytes []byte) error

func (*Avalanche) WriteLockUpgradeFile

func (app *Avalanche) WriteLockUpgradeFile(subnetName string, bytes []byte) error

func (*Avalanche) WriteUpgradeFile

func (app *Avalanche) WriteUpgradeFile(subnetName string, bytes []byte) error

type Downloader

type Downloader interface {
	Download(url string) ([]byte, error)
	GetLatestReleaseVersion(releaseURL string) (string, error)
	GetAllReleasesForRepo(org, repo string) ([]string, error)
}

This is a generic interface for performing highly testable downloads. All methods here involve external http requests. To write tests using these functions, provide a mocked version of this interface to your application object.

func NewDownloader

func NewDownloader() Downloader

Jump to

Keyboard shortcuts

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