Documentation
¶
Overview ¶
Package manage provides devnet lifecycle management commands.
Index ¶
- Constants
- func GetLoadedFileConfig() *config.FileConfig
- func NewDeployCmd() *cobra.Command
- func NewDestroyCmd() *cobra.Command
- func NewNodeCmd() *cobra.Command
- func NewResetCmd() *cobra.Command
- func NewStartCmd() *cobra.Command
- func NewStopCmd() *cobra.Command
- func NewUpgradeCmd() *cobra.Command
- func ResolveGitHubToken(fileCfg *config.FileConfig) (string, bool)
- func RunInteractiveVersionSelection(ctx context.Context, cmd *cobra.Command, includeNetworkSelection bool, ...) (*interactive.SelectionConfig, error)
- func RunInteractiveVersionSelectionWithMode(ctx context.Context, cmd *cobra.Command, includeNetworkSelection bool, ...) (*interactive.SelectionConfig, error)
- func SetupGitHubClient(homeDir string, fileCfg *config.FileConfig) *github.Client
- func WrapInteractiveError(cmd *cobra.Command, err error, context string) error
- type DeployResult
- type NodeActionResult
- type PortsMetadataAdapter
- func (a *PortsMetadataAdapter) GetBinaryName() string
- func (a *PortsMetadataAdapter) GetChainID() string
- func (a *PortsMetadataAdapter) GetExecutionMode() types.ExecutionMode
- func (a *PortsMetadataAdapter) GetHomeDir() string
- func (a *PortsMetadataAdapter) GetNumValidators() int
- func (a *PortsMetadataAdapter) GetVersion() string
- func (a *PortsMetadataAdapter) Save() error
- func (a *PortsMetadataAdapter) SetExecutionMode(mode types.ExecutionMode)
- func (a *PortsMetadataAdapter) SetVersion(version string)
- type UpJSONResult
- type UpgradeExecutionMode
- type UpgradeResultJSON
Constants ¶
const ( DefaultHeightBuffer = 0 // 0 = auto-calculate based on block time DefaultVotingPeriod = 60 * time.Second )
Default upgrade constants
Variables ¶
This section is empty.
Functions ¶
func GetLoadedFileConfig ¶
func GetLoadedFileConfig() *config.FileConfig
GetLoadedFileConfig returns the loaded config.toml values via the shared accessor.
func ResolveGitHubToken ¶
func ResolveGitHubToken(fileCfg *config.FileConfig) (string, bool)
ResolveGitHubToken resolves the GitHub token from environment or config. Priority: environment variable > config file.
func RunInteractiveVersionSelection ¶
func RunInteractiveVersionSelection(ctx context.Context, cmd *cobra.Command, includeNetworkSelection bool, network string) (*interactive.SelectionConfig, error)
RunInteractiveVersionSelection runs the unified version selection flow.
func RunInteractiveVersionSelectionWithMode ¶
func RunInteractiveVersionSelectionWithMode(ctx context.Context, cmd *cobra.Command, includeNetworkSelection bool, forUpgrade bool, network string, skipUpgradeName bool) (*interactive.SelectionConfig, error)
RunInteractiveVersionSelectionWithMode runs version selection with upgrade mode support. When forUpgrade is true, returns a SelectionConfig derived from UpgradeSelectionConfig. When skipUpgradeName is true (e.g., --skip-gov mode), it skips the upgrade name prompt.
func SetupGitHubClient ¶
func SetupGitHubClient(homeDir string, fileCfg *config.FileConfig) *github.Client
SetupGitHubClient creates a GitHub client with optional caching and token.
Types ¶
type DeployResult ¶
type DeployResult struct {
Status string `json:"status"`
ChainID string `json:"chain_id"`
Network string `json:"network"` // Snapshot source: mainnet/testnet
BlockchainNetwork string `json:"blockchain_network"` // Network module: stable/ault
Mode string `json:"mode"`
DockerImage string `json:"docker_image,omitempty"`
Validators int `json:"validators"`
Nodes []types.NodeResult `json:"nodes"`
}
DeployResult represents the JSON output for the deploy command.
type NodeActionResult ¶
type NodeActionResult struct {
Node int `json:"node"`
Action string `json:"action"`
Status string `json:"status"`
PreviousState string `json:"previous_state,omitempty"`
CurrentState string `json:"current_state,omitempty"`
Error string `json:"error,omitempty"`
}
NodeActionResult represents the JSON output for node commands.
type PortsMetadataAdapter ¶
type PortsMetadataAdapter struct {
// contains filtered or unexported fields
}
PortsMetadataAdapter wraps *ports.DevnetMetadata for compatibility.
func NewPortsMetadataAdapter ¶
func NewPortsMetadataAdapter(m *ports.DevnetMetadata, svc *application.DevnetService, nm network.NetworkModule) *PortsMetadataAdapter
NewPortsMetadataAdapter creates a new adapter wrapping the given ports metadata.
func (*PortsMetadataAdapter) GetBinaryName ¶
func (a *PortsMetadataAdapter) GetBinaryName() string
func (*PortsMetadataAdapter) GetChainID ¶
func (a *PortsMetadataAdapter) GetChainID() string
func (*PortsMetadataAdapter) GetExecutionMode ¶
func (a *PortsMetadataAdapter) GetExecutionMode() types.ExecutionMode
func (*PortsMetadataAdapter) GetHomeDir ¶
func (a *PortsMetadataAdapter) GetHomeDir() string
func (*PortsMetadataAdapter) GetNumValidators ¶
func (a *PortsMetadataAdapter) GetNumValidators() int
func (*PortsMetadataAdapter) GetVersion ¶
func (a *PortsMetadataAdapter) GetVersion() string
func (*PortsMetadataAdapter) Save ¶
func (a *PortsMetadataAdapter) Save() error
func (*PortsMetadataAdapter) SetExecutionMode ¶
func (a *PortsMetadataAdapter) SetExecutionMode(mode types.ExecutionMode)
func (*PortsMetadataAdapter) SetVersion ¶
func (a *PortsMetadataAdapter) SetVersion(version string)
type UpJSONResult ¶
type UpJSONResult struct {
Status string `json:"status"`
ChainID string `json:"chain_id,omitempty"`
BlockchainNetwork string `json:"blockchain_network,omitempty"`
Mode string `json:"mode"`
SuccessfulNodes []int `json:"successful_nodes"`
FailedNodes []types.FailedNodeJSON `json:"failed_nodes,omitempty"`
Nodes []types.NodeResult `json:"nodes,omitempty"`
Error string `json:"error,omitempty"`
}
UpJSONResult represents the JSON output for the start command.
type UpgradeExecutionMode ¶
type UpgradeExecutionMode string
UpgradeExecutionMode for upgrade command
const ( UpgradeModeDocker UpgradeExecutionMode = "docker" UpgradeModeLocal UpgradeExecutionMode = "local" )
type UpgradeResultJSON ¶
type UpgradeResultJSON struct {
Status string `json:"status"`
UpgradeName string `json:"upgrade_name"`
ProposalID uint64 `json:"proposal_id"`
UpgradeHeight int64 `json:"upgrade_height"`
PostUpgradeHeight int64 `json:"post_upgrade_height"`
NewBinary string `json:"new_binary"`
Duration string `json:"duration"`
PreGenesisPath string `json:"pre_genesis_path,omitempty"`
PostGenesisPath string `json:"post_genesis_path,omitempty"`
}
UpgradeResultJSON represents the JSON output for the upgrade command.