Documentation
¶
Index ¶
- Constants
- Variables
- func BlockchainAlreadyDeployedOnLocalNetwork(app *application.Lux, blockchainName string) (bool, error)
- func CreateLocalCluster(app *application.Lux, printFn func(string, ...interface{}), luxdVersion string, ...) (interface{}, map[string]interface{}, error)
- func GetExtraLocalNetworkData(app *application.Lux, networkName string) (interface{}, map[string]interface{}, error)
- func GetLocalCluster(app *application.Lux, clusterName string) (interface{}, error)
- func GetLocalClusterDir(app *application.Lux, clusterName string) string
- func GetLocalClusterNetworkModel(app *application.Lux, clusterName string) (sdkModels.Network, error)
- func GetLocalClusterURIs(app *application.Lux, clusterName string) ([]string, error)
- func GetLocalClusters(app *application.Lux) ([]string, error)
- func GetLocalNetworkDir(app *application.Lux) string
- func GetLocalNetworkLuxdVersion(app *application.Lux) (string, int, bool, error)
- func GetRunningLocalClustersConnectedToLocalNetwork(app *application.Lux) ([]string, error)
- func LoadLocalCluster(app *application.Lux, clusterName string, binaryPath string) error
- func LocalClusterExists(app *application.Lux, clusterName string) bool
- func LocalClusterHealth(app *application.Lux, clusterName string) (bool, bool, error)
- func LocalClusterIsRunning(app *application.Lux, clusterName string) (bool, error)
- func LocalClusterName() string
- func LocalClusterRemove(app *application.Lux, clusterName string) error
- func LocalClusterTrackSubnet(app *application.Lux, printFn func(string, ...interface{}), ...) error
- func LocalNetworkIsRunning(app *application.Lux) (bool, error)
- func LocalNetworkStop(app *application.Lux, snapshotName ...string) error
- func LocalNetworkTrackSubnet(app *application.Lux, printFn func(string, ...interface{}), ...) error
- func PrintEndpoints(app *application.Lux, printFn func(string, ...interface{}), ...) error
- func RefreshLocalClusterAliases(app *application.Lux, clusterName string) error
- func SetupLuxdBinary(app *application.Lux, version string, binaryPath string) (string, error)
- func StartLocalNetwork(app *application.Lux, clusterName, nodeVersion string) error
- func WriteExtraLocalNetworkData(app *application.Lux, data map[string]interface{}) error
- type BlockchainInfo
- type ConnectionSettings
- type LocalCluster
- type NodeInfo
- type NodeSetting
- type StatusChecker
Constants ¶
const LocalClusterNameConst = "local-cluster"
Constants and functions
Variables ¶
var ErrNetworkNotRunning = fmt.Errorf("network not running")
Functions ¶
func BlockchainAlreadyDeployedOnLocalNetwork ¶
func BlockchainAlreadyDeployedOnLocalNetwork(app *application.Lux, blockchainName string) (bool, error)
BlockchainAlreadyDeployedOnLocalNetwork checks if blockchain is deployed
func CreateLocalCluster ¶
func CreateLocalCluster( app *application.Lux, printFn func(string, ...interface{}), luxdVersion string, binPath string, clusterName string, globalConfig map[string]interface{}, connectionSettings ConnectionSettings, numNodes uint32, nodeSettings []NodeSetting, validators []interface{}, network interface{}, enableMonitoring bool, disableGrpcGateway bool, ) (interface{}, map[string]interface{}, error)
CreateLocalCluster creates a new local cluster using netrunner
func GetExtraLocalNetworkData ¶
func GetExtraLocalNetworkData(app *application.Lux, networkName string) (interface{}, map[string]interface{}, error)
GetExtraLocalNetworkData returns extra data for local network
func GetLocalCluster ¶
func GetLocalCluster(app *application.Lux, clusterName string) (interface{}, error)
GetLocalCluster returns a specific cluster
func GetLocalClusterDir ¶
func GetLocalClusterDir(app *application.Lux, clusterName string) string
GetLocalClusterDir returns the directory for a local cluster
func GetLocalClusterNetworkModel ¶
func GetLocalClusterNetworkModel(app *application.Lux, clusterName string) (sdkModels.Network, error)
GetLocalClusterNetworkModel returns the network model for a local cluster
func GetLocalClusterURIs ¶
func GetLocalClusterURIs(app *application.Lux, clusterName string) ([]string, error)
GetLocalClusterURIs returns the URIs for a local cluster
func GetLocalClusters ¶
func GetLocalClusters(app *application.Lux) ([]string, error)
GetLocalClusters returns all local clusters
func GetLocalNetworkDir ¶
func GetLocalNetworkDir(app *application.Lux) string
GetLocalNetworkDir returns the directory for the local network
func GetLocalNetworkLuxdVersion ¶
GetLocalNetworkLuxdVersion returns the luxd version running on local network
func GetRunningLocalClustersConnectedToLocalNetwork ¶
func GetRunningLocalClustersConnectedToLocalNetwork(app *application.Lux) ([]string, error)
GetRunningLocalClustersConnectedToLocalNetwork returns running clusters
func LoadLocalCluster ¶
func LoadLocalCluster(app *application.Lux, clusterName string, binaryPath string) error
LoadLocalCluster loads an existing local cluster
func LocalClusterExists ¶
func LocalClusterExists(app *application.Lux, clusterName string) bool
LocalClusterExists checks if a local cluster exists
func LocalClusterHealth ¶
LocalClusterHealth checks the health of a local cluster
func LocalClusterIsRunning ¶
func LocalClusterIsRunning(app *application.Lux, clusterName string) (bool, error)
LocalClusterIsRunning checks if a cluster is running
func LocalClusterName ¶
func LocalClusterName() string
LocalClusterName returns the default cluster name
func LocalClusterRemove ¶
func LocalClusterRemove(app *application.Lux, clusterName string) error
LocalClusterRemove removes a local cluster
func LocalClusterTrackSubnet ¶
func LocalClusterTrackSubnet(app *application.Lux, printFn func(string, ...interface{}), clusterName, blockchainName, vmID, subnetID string) error
LocalClusterTrackSubnet tracks a subnet in the local cluster
func LocalNetworkIsRunning ¶
func LocalNetworkIsRunning(app *application.Lux) (bool, error)
LocalNetworkIsRunning checks if a local network is running
func LocalNetworkStop ¶
func LocalNetworkStop(app *application.Lux, snapshotName ...string) error
LocalNetworkStop stops the local network
func LocalNetworkTrackSubnet ¶
func LocalNetworkTrackSubnet(app *application.Lux, printFn func(string, ...interface{}), blockchainName, vmID string) error
LocalNetworkTrackSubnet tracks a subnet on the local network
func PrintEndpoints ¶
func PrintEndpoints(app *application.Lux, printFn func(string, ...interface{}), blockchainName string) error
PrintEndpoints prints the RPC endpoints for a blockchain
func RefreshLocalClusterAliases ¶
func RefreshLocalClusterAliases(app *application.Lux, clusterName string) error
RefreshLocalClusterAliases refreshes cluster aliases
func SetupLuxdBinary ¶
SetupLuxdBinary sets up the luxd binary for local testing
func StartLocalNetwork ¶
func StartLocalNetwork(app *application.Lux, clusterName, nodeVersion string) error
StartLocalNetwork starts a local network
func WriteExtraLocalNetworkData ¶
func WriteExtraLocalNetworkData(app *application.Lux, data map[string]interface{}) error
WriteExtraLocalNetworkData writes extra data for local network
Types ¶
type BlockchainInfo ¶
BlockchainInfo contains information about a blockchain
func GetLocalNetworkBlockchainsInfo ¶
func GetLocalNetworkBlockchainsInfo(app *application.Lux) ([]BlockchainInfo, error)
GetLocalNetworkBlockchainsInfo returns information about blockchains in local network
type ConnectionSettings ¶
ConnectionSettings contains connection information for a local network
func GetLocalNetworkConnectionInfo ¶
func GetLocalNetworkConnectionInfo(app *application.Lux) (ConnectionSettings, error)
GetLocalNetworkConnectionInfo returns connection settings for the local network
type LocalCluster ¶ added in v1.9.5
type LocalCluster struct {
Nodes map[string]interface{}
}
LocalCluster represents a local network cluster
type NodeInfo ¶ added in v1.9.5
type NodeInfo struct {
URI string
}
NodeInfo contains information about a node
func AddNodeToLocalCluster ¶
func AddNodeToLocalCluster( app *application.Lux, printFn func(string, ...interface{}), clusterName string, numNodes uint32, network uint32, ) (NodeInfo, error)
AddNodeToLocalCluster adds a node to a local cluster
type NodeSetting ¶
type NodeSetting struct {
Name string
ConfigFile string
HTTPPort uint64
StakingPort uint64
StakingSignerKey []byte
StakingCertKey []byte
StakingTLSKey []byte
}
NodeSetting contains settings for a local node
type StatusChecker ¶ added in v1.9.5
StatusChecker is an interface for checking network status
func NewStatusChecker ¶ added in v1.9.5
func NewStatusChecker() StatusChecker
NewStatusChecker creates a new status checker