Crate super_orchestrator

Source
Expand description

See README.md for more

Modules§

cli_docker
Docker container management, using the “docker” OS command as a backend.
net_message
Communication with NetMessenger

Structs§

Command
An OS Command, this is tokio::process::Command wrapped in a bunch of helping functionality.
CommandResult
The result of a Command
CommandResultNoDebug
The same as a CommandResult, but the stdout and stderr are not included in the debug info
CommandRunner
Detached Commands are represented by this struct.
CtrlCTask
A convenience wrapper around the functionality of tokio::signal::ctrl_c
FileOptions
A wrapper combining capabilities from tokio::fs::{OpenOptions, File} with a lot of opinionated defaults and close_file.
WriteOptions

Enums§

ReadOrWrite

Functions§

acquire_dir_path
Canonicalizes and checks the existence of a directory path. Also adds on better information to errors.
acquire_file_path
Canonicalizes and checks the existence of a file path. Also adds on better information to errors.
acquire_path
Canonicalizes and checks the existence of a path. Also adds on better information to errors.
close_file
This function makes sure changes are flushed and sync_all is called to make sure the file has actually been completely written to the filesystem and closed before the end of this function.
get_separated_val
First, this splits by separate, trims outer whitespace, sees if key is prefixed, if so it also strips inter_key_val and returns the stripped and trimmed value.
random_name
remove_files_in_dir
This is a guarded kind of removal that only removes all files in a directory that match an element of ends_with. If the element starts with “.”, extensions are matched against, otherwise whole file names are matched against. Only whole extension components are matched against.
sh
Equivalent to calling Command::new(program_with_args[0]).args(program_with_args[1..]) .debug(true).run_to_completion().await?.assert_success()?; and returning the stdout as a String.
sh_no_debug
sh but without debug mode
type_hash
Takes the hash of the type name of T and returns it. Has the potential to change between compiler versions.
wait_for_ok
Repeatedly polls f until it returns an Ok which is returned, or num_retries is reached in which a timeout error is returned.