manage

package
v1.0.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: MIT Imports: 32 Imported by: 0

Documentation

Overview

Package manage provides devnet lifecycle management commands.

Index

Constants

View Source
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 NewDeployCmd

func NewDeployCmd() *cobra.Command

NewDeployCmd creates the deploy command.

func NewDestroyCmd

func NewDestroyCmd() *cobra.Command

NewDestroyCmd creates the destroy command.

func NewNodeCmd

func NewNodeCmd() *cobra.Command

NewNodeCmd creates the node command group.

func NewResetCmd

func NewResetCmd() *cobra.Command

NewResetCmd creates the reset command.

func NewStartCmd

func NewStartCmd() *cobra.Command

NewStartCmd creates the start command.

func NewStopCmd

func NewStopCmd() *cobra.Command

NewStopCmd creates the stop command.

func NewUpgradeCmd

func NewUpgradeCmd() *cobra.Command

NewUpgradeCmd creates the upgrade command.

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.

func WrapInteractiveError

func WrapInteractiveError(cmd *cobra.Command, err error, context string) error

WrapInteractiveError wraps interactive errors with additional context.

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

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.

Jump to

Keyboard shortcuts

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