application

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Overview

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

Copyright (C) 2023, 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

This section is empty.

Types

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

type LastActions

type LastActions struct {
	LastSkipCheck time.Time
	LastUpdated   time.Time
	LastCheckGit  time.Time
}

type Odyssey

type Odyssey struct {
	Log logging.Logger

	Conf       *config.Config
	Prompt     prompts.Prompter
	Opm        *opm.OPM
	OpmDir     string
	Downloader Downloader
	// contains filtered or unexported fields
}

func New

func New() *Odyssey

func (*Odyssey) ChainConfigExists

func (app *Odyssey) ChainConfigExists(subnetName string) bool

func (*Odyssey) CheckCertInSSHDir

func (app *Odyssey) CheckCertInSSHDir(certName string) (bool, error)

func (*Odyssey) ClustersConfigExists

func (app *Odyssey) ClustersConfigExists() bool

func (*Odyssey) CopyGenesisFile

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

func (*Odyssey) CopyKeyFile

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

func (*Odyssey) CopyVMBinary

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

func (*Odyssey) CreateAnsibleDir

func (app *Odyssey) CreateAnsibleDir() error

func (*Odyssey) CreateAnsibleInventoryDir

func (app *Odyssey) CreateAnsibleInventoryDir() error

func (*Odyssey) CreateAnsibleNodeConfigDir

func (app *Odyssey) CreateAnsibleNodeConfigDir(nodeID string) error

CreateAnsibleNodeConfigDir creates the ansible node config directory specific for nodeID inside .odyssey-cli

func (*Odyssey) CreateElasticSubnetConfig

func (app *Odyssey) CreateElasticSubnetConfig(subnetName string, es *models.ElasticSubnetConfig) error

func (*Odyssey) CreateMonitoringDashboardDir

func (app *Odyssey) CreateMonitoringDashboardDir() error

func (*Odyssey) CreateMonitoringDir

func (app *Odyssey) CreateMonitoringDir() error

func (*Odyssey) CreateNodeCloudConfigFile

func (app *Odyssey) CreateNodeCloudConfigFile(nodeName string, nodeConfig *models.NodeConfig) error

func (*Odyssey) CreateSidecar

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

func (*Odyssey) GenesisExists

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

func (*Odyssey) GetAnsibleDir

func (app *Odyssey) GetAnsibleDir() string

func (*Odyssey) GetAnsibleInventoryDirPath

func (app *Odyssey) GetAnsibleInventoryDirPath(clusterName string) string

func (*Odyssey) GetBaseDir

func (app *Odyssey) GetBaseDir() string

func (*Odyssey) GetChainConfigPath

func (app *Odyssey) GetChainConfigPath(subnetName string) string

func (*Odyssey) GetClustersConfigPath

func (app *Odyssey) GetClustersConfigPath() string

func (*Odyssey) GetCustomVMDir

func (app *Odyssey) GetCustomVMDir() string

func (*Odyssey) GetCustomVMPath

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

func (*Odyssey) GetDownloader

func (app *Odyssey) GetDownloader() Downloader

func (*Odyssey) GetElasticSubnetConfigPath

func (app *Odyssey) GetElasticSubnetConfigPath(subnetName string) string

func (*Odyssey) GetGenesisPath

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

func (*Odyssey) GetKeyDir

func (app *Odyssey) GetKeyDir() string

func (*Odyssey) GetKeyPath

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

func (*Odyssey) GetMonitoringDashboardDir

func (app *Odyssey) GetMonitoringDashboardDir() string

func (*Odyssey) GetMonitoringDir

func (app *Odyssey) GetMonitoringDir() string

func (*Odyssey) GetMonitoringScriptFile

func (app *Odyssey) GetMonitoringScriptFile() string

func (*Odyssey) GetNodeBLSSecretKeyPath

func (app *Odyssey) GetNodeBLSSecretKeyPath(instanceID string) string

func (*Odyssey) GetNodeConfigJSONFile

func (app *Odyssey) GetNodeConfigJSONFile(nodeID string) string

func (*Odyssey) GetNodeConfigPath

func (app *Odyssey) GetNodeConfigPath(nodeName string) string

func (*Odyssey) GetNodeInstanceDirPath

func (app *Odyssey) GetNodeInstanceDirPath(nodeName string) string

func (*Odyssey) GetNodeInstanceOdygoConfigDirPath

func (app *Odyssey) GetNodeInstanceOdygoConfigDirPath(nodeName string) string

func (*Odyssey) GetNodesDir

func (app *Odyssey) GetNodesDir() string

func (*Odyssey) GetOPMBaseDir

func (app *Odyssey) GetOPMBaseDir() string

func (*Odyssey) GetOPMLog

func (app *Odyssey) GetOPMLog() string

func (*Odyssey) GetOPMPluginDir

func (app *Odyssey) GetOPMPluginDir() string

func (*Odyssey) GetOPMVMPath

func (app *Odyssey) GetOPMVMPath(vmid string) string

func (*Odyssey) GetOdygoNodeConfigPath

func (app *Odyssey) GetOdygoNodeConfigPath(subnetName string) string

func (*Odyssey) GetOdygoSubnetConfigPath

func (app *Odyssey) GetOdygoSubnetConfigPath(subnetName string) string

func (*Odyssey) GetOdysseygoBinDir

func (app *Odyssey) GetOdysseygoBinDir() string

func (*Odyssey) GetOdysseygoCompatibilityURL

func (*Odyssey) GetOdysseygoCompatibilityURL() string

func (*Odyssey) GetPluginsDir

func (app *Odyssey) GetPluginsDir() string

func (*Odyssey) GetReposDir

func (app *Odyssey) GetReposDir() string

func (*Odyssey) GetRunDir

func (app *Odyssey) GetRunDir() string

func (*Odyssey) GetRunFile

func (app *Odyssey) GetRunFile() string

func (*Odyssey) GetSSHCertFilePath

func (*Odyssey) GetSSHCertFilePath(certName string) (string, error)

func (*Odyssey) GetSidecarNames

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

func (*Odyssey) GetSidecarPath

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

func (*Odyssey) GetSnapshotsDir

func (app *Odyssey) GetSnapshotsDir() string

func (*Odyssey) GetSubnetDir

func (app *Odyssey) GetSubnetDir() string

func (*Odyssey) GetSubnetEVMBinDir

func (app *Odyssey) GetSubnetEVMBinDir() string

func (*Odyssey) GetTmpPluginDir

func (*Odyssey) GetTmpPluginDir() string

func (*Odyssey) GetTokenName

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

func (*Odyssey) GetUpgradeBytesFilePath

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

func (*Odyssey) GetUpgradeBytesFilepath

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

func (*Odyssey) KeyExists

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

func (*Odyssey) LoadClusterNodeConfig

func (app *Odyssey) LoadClusterNodeConfig(nodeName string) (models.NodeConfig, error)

func (*Odyssey) LoadClustersConfig

func (app *Odyssey) LoadClustersConfig() (models.ClustersConfig, error)

func (*Odyssey) LoadElasticSubnetConfig

func (app *Odyssey) LoadElasticSubnetConfig(subnetName string) (models.ElasticSubnetConfig, error)

func (*Odyssey) LoadEvmGenesis

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

func (*Odyssey) LoadRawChainConfig

func (app *Odyssey) LoadRawChainConfig(subnetName string) ([]byte, error)

func (*Odyssey) LoadRawGenesis

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

func (*Odyssey) LoadRawNetworkUpgrades

func (app *Odyssey) LoadRawNetworkUpgrades(subnetName string) ([]byte, error)

func (*Odyssey) LoadRawOdygoNodeConfig

func (app *Odyssey) LoadRawOdygoNodeConfig(subnetName string) ([]byte, error)

func (*Odyssey) LoadRawOdygoSubnetConfig

func (app *Odyssey) LoadRawOdygoSubnetConfig(subnetName string) ([]byte, error)

func (*Odyssey) LoadSidecar

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

func (*Odyssey) NetworkUpgradeExists

func (app *Odyssey) NetworkUpgradeExists(subnetName string) bool

func (*Odyssey) OdygoNodeConfigExists

func (app *Odyssey) OdygoNodeConfigExists(subnetName string) bool

func (*Odyssey) OdygoSubnetConfigExists

func (app *Odyssey) OdygoSubnetConfigExists(subnetName string) bool

func (*Odyssey) ReadLastActionsFile

func (app *Odyssey) ReadLastActionsFile() (*LastActions, error)

func (*Odyssey) ReadLockUpgradeFile

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

func (*Odyssey) ReadUpgradeFile

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

func (*Odyssey) ResetPluginsDir

func (app *Odyssey) ResetPluginsDir() error

Remove all plugins from plugin dir

func (*Odyssey) Setup

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

func (*Odyssey) SetupMonitoringEnv

func (app *Odyssey) SetupMonitoringEnv() error

func (*Odyssey) SidecarExists

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

func (*Odyssey) SubnetConfigExists

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

func (*Odyssey) UpdateSidecar

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

func (*Odyssey) UpdateSidecarElasticSubnet

func (app *Odyssey) UpdateSidecarElasticSubnet(
	sc *models.Sidecar,
	network models.Network,
	subnetID ids.ID,
	assetID ids.ID,
	oChainTxID ids.ID,
	tokenName string,
	tokenSymbol string,
) error

func (*Odyssey) UpdateSidecarElasticSubnetPartialTx

func (app *Odyssey) UpdateSidecarElasticSubnetPartialTx(
	sc *models.Sidecar,
	network models.Network,
	txName string,
	txID ids.ID,
) error

func (*Odyssey) UpdateSidecarNetworks

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

func (*Odyssey) UpdateSidecarPermissionlessValidator

func (app *Odyssey) UpdateSidecarPermissionlessValidator(
	sc *models.Sidecar,
	network models.Network,
	nodeID string,
	txID ids.ID,
) error

func (*Odyssey) WriteChainConfigFile

func (app *Odyssey) WriteChainConfigFile(subnetName string, bs []byte) error

func (*Odyssey) WriteClustersConfigFile

func (app *Odyssey) WriteClustersConfigFile(clustersConfig *models.ClustersConfig) error

func (*Odyssey) WriteGenesisFile

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

func (*Odyssey) WriteLastActionsFile

func (app *Odyssey) WriteLastActionsFile(acts *LastActions)

func (*Odyssey) WriteLockUpgradeFile

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

func (*Odyssey) WriteNetworkUpgradesFile

func (app *Odyssey) WriteNetworkUpgradesFile(subnetName string, bs []byte) error

func (*Odyssey) WriteOdygoNodeConfigFile

func (app *Odyssey) WriteOdygoNodeConfigFile(subnetName string, bs []byte) error

func (*Odyssey) WriteOdygoSubnetConfigFile

func (app *Odyssey) WriteOdygoSubnetConfigFile(subnetName string, bs []byte) error

func (*Odyssey) WriteUpgradeFile

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

Jump to

Keyboard shortcuts

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