Function brane_ctl::generate::node

source ·
pub fn node(
    path: impl Into<PathBuf>,
    hosts: Vec<Pair<String, ':', IpAddr>>,
    fix_dirs: bool,
    config_path: impl Into<PathBuf>,
    command: GenerateNodeSubcommand,
) -> Result<(), Error>
Expand description

Handles generating a new node.yml config file for a central or worker node.

§Arguments

  • path: The path to write the central node.yml to.
  • hosts: List of additional hostnames to set in the launched containers.
  • fix_dirs: if true, will generate missing directories instead of complaining.
  • config_path: The path to the config directory that other paths may use as their base.
  • command: The GenerateSubcommand that contains the specific values to write, as well as whether to write a central or worker node.

§Returns

Nothing, but does write a new file to the given path and updates the user on stdout on success.

§Errors

This function may error if I/O errors occur while writing the file.