Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ConfigCmd is the parent command for config-related subcommands ConfigCmd = cobra.Command{ Use: "config", Short: "Configuration management commands", } // InitCmd creates a starter config.toml InitCmd = cobra.Command{ Use: "init", Short: "Create a starter config.toml from the example template", Long: `Creates a config.toml file in the current directory with sensible defaults. The generated config has all parameters with good defaults - you only need to customize the storage paths for your setup. If config.toml already exists, this command will not overwrite it.`, Run: func(cmd *cobra.Command, args []string) { runConfigInit() }, } // SetCmd updates a config value SetCmd = cobra.Command{ Use: "set <key> <value>", Short: "Set a configuration value in config.toml", Long: `Updates a configuration value in config.toml. Examples: mithril config set storage.accounts /mnt/accounts mithril config set storage.blockstore /mnt/blockstore mithril config set storage.snapshots /mnt/snapshots mithril config set bootstrap.mode auto mithril config set replay.txpar 48 Common keys: storage.accounts - Path to AccountsDB directory storage.blockstore - Path to blockstore directory storage.snapshots - Path to snapshots directory bootstrap.mode - Startup mode: auto, snapshot, or accountsdb replay.txpar - Transaction parallelism (recommended: 2x CPU cores) network.rpc - RPC endpoint(s)`, Args: cobra.ExactArgs(2), Run: func(cmd *cobra.Command, args []string) { runConfigSet(args[0], args[1]) }, } // GetCmd reads a config value GetCmd = cobra.Command{ Use: "get <key>", Short: "Get a configuration value from config.toml", Long: `Reads a configuration value from config.toml. Examples: mithril config get storage.accounts mithril config get bootstrap.mode`, Args: cobra.ExactArgs(1), Run: func(cmd *cobra.Command, args []string) { runConfigGet(args[0]) }, } )
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.