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) ConfigFileExists() bool
- func (app *Lux) GetAggregatorLogDir(clusterName string) string
- func (app *Lux) GetBasePath() string
- func (app *Lux) GetEVMBinDir() string
- func (app *Lux) GetLuxBinDir() string
- func (*Lux) GetLuxCompatibilityURL() string
- func (app *Lux) GetLuxgoBinDir() string
- func (app *Lux) GetReposDir() string
- func (app *Lux) GetSDKApp() *sdkapp.Lux
- func (app *Lux) GetUpgradeBytesFilepath(subnetName string) string
- func (app *Lux) HasSubnetEVMGenesis(blockchainName string) (bool, string, error)
- func (app *Lux) LoadConfig() (types.Config, error)
- func (app *Lux) LoadEvmGenesis(blockchainName string) (*types.EvmGenesis, error)
- func (app *Lux) ReadLastActionsFile() (*LastActions, error)
- func (app *Lux) Setup(baseDir string, log luxlog.Logger, conf *config.Config, ...)
- func (app *Lux) WriteConfigFile(data []byte) error
- func (app *Lux) WriteLastActionsFile(acts *LastActions)
Constants ¶
const (
WriteReadReadPerms = 0o644
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Downloader ¶
type Downloader interface {
Download(url string) ([]byte, error)
DownloadWithTee(url string, filePath string) ([]byte, error)
GetLatestReleaseVersion(releaseURL string) (string, error)
GetLatestPreReleaseVersion(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 ¶
Lux extends the SDK's application.Lux type with CLI-specific functionality
func (*Lux) ConfigFileExists ¶
func (*Lux) GetAggregatorLogDir ¶
GetAggregatorLogDir returns the signature aggregator log directory
func (*Lux) GetBasePath ¶
GetBasePath returns the base directory path for the CLI
func (*Lux) GetEVMBinDir ¶
func (*Lux) GetLuxBinDir ¶
func (*Lux) GetLuxCompatibilityURL ¶
func (*Lux) GetLuxgoBinDir ¶
func (*Lux) GetReposDir ¶
func (*Lux) GetSDKApp ¶
GetSDKApp returns the embedded SDK application for compatibility with SDK-based functions
func (*Lux) GetUpgradeBytesFilepath ¶
func (*Lux) HasSubnetEVMGenesis ¶
HasSubnetEVMGenesis checks if the blockchain has a Subnet-EVM genesis
func (*Lux) LoadEvmGenesis ¶
func (app *Lux) LoadEvmGenesis(blockchainName string) (*types.EvmGenesis, error)
LoadEvmGenesis loads EVM genesis for a blockchain
func (*Lux) ReadLastActionsFile ¶
func (app *Lux) ReadLastActionsFile() (*LastActions, error)
func (*Lux) WriteConfigFile ¶
CLI-specific config methods
func (*Lux) WriteLastActionsFile ¶
func (app *Lux) WriteLastActionsFile(acts *LastActions)