context

package
v1.1.0-b1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Environment variable to set the system path for unit tests
	TestSystemDirEnvVar string = "HYPERDRIVE_TEST_SYSTEM_DIR"
)

Variables

This section is empty.

Functions

func SetHyperdriveContext

func SetHyperdriveContext(c *cli.Context, hd *HyperdriveContext)

Add the Hyperdrive context into a CLI context

Types

type HyperdriveContext

type HyperdriveContext struct {
	*InstallationInfo

	// The path to the configuration file
	ConfigPath string

	// The max fee for transactions
	MaxFee float64

	// The max priority fee for transactions
	MaxPriorityFee float64

	// The nonce for the first transaction, if set
	Nonce *big.Int

	// True if debug mode is enabled
	DebugEnabled bool

	// True if this is a secure session
	SecureSession bool

	// The address and URL of the API server
	ApiUrl *url.URL

	// The HTTP trace file if tracing is enabled
	HttpTraceFile *os.File

	// The list of networks options and corresponding settings for Hyperdrive itself
	HyperdriveNetworkSettings []*hdconfig.HyperdriveSettings

	// The list of networks options and corresponding settings for the StakeWise module
	StakeWiseNetworkSettings []*swconfig.StakeWiseSettings

	// The list of networks options and corresponding settings for the Constellation module
	ConstellationNetworkSettings []*csconfig.ConstellationSettings
}

Context for global settings

func GetHyperdriveContext

func GetHyperdriveContext(c *cli.Context) *HyperdriveContext

Get the Hyperdrive context from a CLI context

type InstallationInfo added in v1.1.0

type InstallationInfo struct {
	// The system path for Hyperdrive scripts used in the Docker containers
	ScriptsDir string

	// The system path for Hyperdrive templates
	TemplatesDir string

	// The system path for the source files to put in the user's override directory
	OverrideSourceDir string

	// The system path for built-in network settings and resource definitions
	NetworksDir string
}

Holds information about Hyperdrive's installation on the system

func NewInstallationInfo added in v1.1.0

func NewInstallationInfo() *InstallationInfo

Creates a new installation info instance

Jump to

Keyboard shortcuts

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