pub fn infra(
locations: Vec<Pair<String, ':', String>>,
fix_dirs: bool,
path: impl Into<PathBuf>,
names: Vec<Pair<String, '=', String>>,
reg_ports: Vec<Pair<String, '=', u16>>,
job_ports: Vec<Pair<String, '=', u16>>,
) -> Result<(), Error>
Expand description
Handles generating a new infra.yml
config file.
§Arguments
locations
: The locations (i.e., worker nodes) to define.fix_dirs
: if true, will generate missing directories instead of complaining.path
: The path to write theinfra.yml
to.names
: The human-friendly names per domain.reg_ports
: The registry ports per domain.job_ports
: The job ports per domain.
§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.