Documentation
¶
Overview ¶
Copyright (C) 2022, Lux Industries Inc. All rights reserved. See the file LICENSE for licensing terms.
Copyright (C) 2023, Lux Industries Inc. All rights reserved. See the file LICENSE for licensing terms.
Index ¶
- Constants
- type Downloader
- type LastActions
- type Lux
- func (app *Lux) CaptureYesNo(prompt string) (bool, error)
- func (app *Lux) ConfigFileExists() bool
- func (app *Lux) CopyGenesisFile(inputFilename string, subnetName string) error
- func (app *Lux) CopyKeyFile(inputFilename string, keyName string) error
- func (app *Lux) CopyVMBinary(inputFilename string, subnetName string) error
- func (app *Lux) CreateElasticSubnetConfig(subnetName string, es *models.ElasticSubnetConfig) error
- func (app *Lux) CreateSidecar(sc *models.Sidecar) error
- func (app *Lux) GenesisExists(subnetName string) bool
- func (app *Lux) GetBaseDir() string
- func (app *Lux) GetConfigPath() string
- func (app *Lux) GetCustomVMDir() string
- func (app *Lux) GetCustomVMPath(subnetName string) string
- func (app *Lux) GetDownloader() Downloader
- func (app *Lux) GetEVMBinDir() string
- func (app *Lux) GetElasticSubnetConfigPath(subnetName string) string
- func (app *Lux) GetGenesisPath(subnetName string) string
- func (app *Lux) GetKeyDir() string
- func (app *Lux) GetKeyPath(keyName string) string
- func (app *Lux) GetLPMBaseDir() string
- func (app *Lux) GetLPMLog() string
- func (app *Lux) GetLPMPluginDir() string
- func (app *Lux) GetLPMVMPath(vmid string) string
- func (app *Lux) GetLuxBinDir() string
- func (*Lux) GetLuxCompatibilityURL() string
- func (app *Lux) GetLuxgoBinDir() string
- func (app *Lux) GetPluginsDir() string
- func (app *Lux) GetReposDir() string
- func (app *Lux) GetRunDir() string
- func (app *Lux) GetRunFile() string
- func (app *Lux) GetSidecarNames() ([]string, error)
- func (app *Lux) GetSidecarPath(subnetName string) string
- func (app *Lux) GetSnapshotsDir() string
- func (app *Lux) GetSubnetDir() string
- func (*Lux) GetTmpPluginDir() string
- func (app *Lux) GetTokenName(subnetName string) string
- func (app *Lux) GetUpgradeBytesFilePath(subnetName string) string
- func (app *Lux) GetUpgradeBytesFilepath(subnetName string) string
- func (app *Lux) GetVersion() string
- func (app *Lux) IsLocalNetworkRunning() bool
- func (app *Lux) KeyExists(keyName string) bool
- func (app *Lux) LoadConfig() (types.Config, error)
- func (app *Lux) LoadElasticSubnetConfig(subnetName string) (models.ElasticSubnetConfig, error)
- func (app *Lux) LoadEvmGenesis(subnetName string) (core.Genesis, error)
- func (app *Lux) LoadRawGenesis(subnetName string) ([]byte, error)
- func (app *Lux) LoadSidecar(subnetName string) (models.Sidecar, error)
- func (app *Lux) ReadLastActionsFile() (*LastActions, error)
- func (app *Lux) ReadLockUpgradeFile(subnetName string) ([]byte, error)
- func (app *Lux) ReadUpgradeFile(subnetName string) ([]byte, error)
- func (app *Lux) Setup(baseDir string, log luxlog.Logger, conf *config.Config, ...)
- func (app *Lux) SidecarExists(subnetName string) bool
- func (app *Lux) SubnetConfigExists(subnetName string) bool
- func (app *Lux) UpdateSidecar(sc *models.Sidecar) error
- func (app *Lux) UpdateSidecarElasticSubnet(sc *models.Sidecar, network models.Network, subnetID ids.ID, assetID ids.ID, ...) error
- func (app *Lux) UpdateSidecarElasticSubnetPartialTx(sc *models.Sidecar, network models.Network, txName string, txID ids.ID) error
- func (app *Lux) UpdateSidecarNetworks(sc *models.Sidecar, network models.Network, subnetID ids.ID, ...) error
- func (app *Lux) UpdateSidecarPermissionlessValidator(sc *models.Sidecar, network models.Network, nodeID string, txID ids.ID) error
- func (app *Lux) WriteConfigFile(data []byte) error
- func (app *Lux) WriteGenesisFile(subnetName string, genesisBytes []byte) error
- func (app *Lux) WriteLastActionsFile(acts *LastActions)
- func (app *Lux) WriteLockUpgradeFile(subnetName string, bytes []byte) error
- func (app *Lux) WriteSidecarFile(sc *models.Sidecar) error
- func (app *Lux) WriteUpgradeFile(subnetName string, bytes []byte) error
Constants ¶
View Source
const (
WriteReadReadPerms = 0o644
)
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 Lux ¶
type Lux struct {
Log luxlog.Logger
Conf *config.Config
Prompt prompts.Prompter
Lpm *lpm.Client
LpmDir string
Apm *lpm.Client // APM is similar to LPM
ApmDir func() string
Downloader Downloader
Cmd interface{} // Current command being executed (cobra.Command)
// contains filtered or unexported fields
}
func (*Lux) CaptureYesNo ¶ added in v1.8.15
CaptureYesNo delegates to the internal prompt
func (*Lux) ConfigFileExists ¶
func (*Lux) CopyGenesisFile ¶ added in v1.7.9
func (*Lux) CopyKeyFile ¶ added in v1.7.9
func (*Lux) CopyVMBinary ¶ added in v1.7.9
func (*Lux) CreateElasticSubnetConfig ¶ added in v1.7.9
func (app *Lux) CreateElasticSubnetConfig(subnetName string, es *models.ElasticSubnetConfig) error
func (*Lux) GenesisExists ¶ added in v1.7.9
func (*Lux) GetBaseDir ¶ added in v1.7.9
func (*Lux) GetConfigPath ¶ added in v1.7.9
func (*Lux) GetCustomVMDir ¶ added in v1.7.9
func (*Lux) GetCustomVMPath ¶ added in v1.7.9
func (*Lux) GetDownloader ¶ added in v1.7.9
func (app *Lux) GetDownloader() Downloader
func (*Lux) GetEVMBinDir ¶
func (*Lux) GetElasticSubnetConfigPath ¶ added in v1.7.9
func (*Lux) GetGenesisPath ¶ added in v1.7.9
func (*Lux) GetKeyPath ¶ added in v1.7.9
func (*Lux) GetLPMBaseDir ¶ added in v1.7.9
func (*Lux) GetLPMPluginDir ¶ added in v1.7.9
func (*Lux) GetLPMVMPath ¶ added in v1.7.9
func (*Lux) GetLuxBinDir ¶
func (*Lux) GetLuxCompatibilityURL ¶
func (*Lux) GetLuxgoBinDir ¶
func (*Lux) GetPluginsDir ¶ added in v1.7.9
func (*Lux) GetReposDir ¶
func (*Lux) GetRunFile ¶ added in v1.7.9
func (*Lux) GetSidecarNames ¶ added in v1.7.9
func (*Lux) GetSidecarPath ¶ added in v1.7.9
func (*Lux) GetSnapshotsDir ¶ added in v1.7.9
func (*Lux) GetSubnetDir ¶ added in v1.7.9
func (*Lux) GetTmpPluginDir ¶ added in v1.7.9
func (*Lux) GetTokenName ¶ added in v1.7.9
func (*Lux) GetUpgradeBytesFilePath ¶ added in v1.7.9
func (*Lux) GetUpgradeBytesFilepath ¶
func (*Lux) GetVersion ¶ added in v1.8.15
func (*Lux) IsLocalNetworkRunning ¶ added in v1.7.9
func (*Lux) LoadElasticSubnetConfig ¶ added in v1.7.9
func (app *Lux) LoadElasticSubnetConfig(subnetName string) (models.ElasticSubnetConfig, error)
func (*Lux) LoadEvmGenesis ¶
func (*Lux) LoadRawGenesis ¶ added in v1.7.9
func (*Lux) LoadSidecar ¶ added in v1.7.9
func (*Lux) ReadLastActionsFile ¶
func (app *Lux) ReadLastActionsFile() (*LastActions, error)
func (*Lux) ReadLockUpgradeFile ¶ added in v1.7.9
func (*Lux) ReadUpgradeFile ¶ added in v1.7.9
func (*Lux) SidecarExists ¶ added in v1.7.9
func (*Lux) SubnetConfigExists ¶ added in v1.7.9
func (*Lux) UpdateSidecarElasticSubnet ¶ added in v1.7.9
func (*Lux) UpdateSidecarElasticSubnetPartialTx ¶ added in v1.7.9
func (*Lux) UpdateSidecarNetworks ¶ added in v1.7.9
func (*Lux) UpdateSidecarPermissionlessValidator ¶ added in v1.7.9
func (*Lux) WriteConfigFile ¶
func (*Lux) WriteGenesisFile ¶ added in v1.7.9
func (*Lux) WriteLastActionsFile ¶
func (app *Lux) WriteLastActionsFile(acts *LastActions)
func (*Lux) WriteLockUpgradeFile ¶ added in v1.7.9
func (*Lux) WriteSidecarFile ¶ added in v1.7.9
Click to show internal directories.
Click to hide internal directories.