Expand description
micromux is a small process supervisor with a terminal UI.
The crate provides the core scheduling and service-management logic used by the CLI and TUI.
Most users will interact with it through Micromux and configuration parsing via
from_str.
§Examples
Parse a configuration file and construct a Micromux instance:
let raw = std::fs::read_to_string("./micromux.yaml")?;
let config_dir = std::path::Path::new(".");
let file_id = 0usize;
let mut diagnostics = vec![];
let config = micromux::from_str(&raw, config_dir, file_id, None, &mut diagnostics)?;
let mux = micromux::Micromux::new(&config)?;Structs§
- Async
Bounded Log - An async wrapper around
BoundedLogthat supports subscriptions. - Bounded
Log - A log buffer that retains only the most recent entries, bounded by line count and/or total bytes.
- Cancellation
Token - A token which can be used to signal a cancellation request to one or more tasks.
- Config
File - A parsed config file together with its origin metadata.
- Micromux
- Main entry point to run a micromux session.
- Printer
- A diagnostics printer backed by
codespan_reporting. - Service
Descriptor - A simplified view of a service for presentation (e.g. in a UI).
Enums§
- Command
- A command sent to the scheduler.
- Config
Error - Errors that can occur while parsing configuration.
- Event
- A scheduler event.
- LogUpdate
Kind - The kind of log update.
- Output
Stream - Origin stream of output.
Traits§
- ToDiagnostics
- Convert an error type into codespan diagnostics.
Functions§
- find_
config_ file - Find a configuration file in the given directory.
- from_
str - Parse a micromux configuration from a YAML string.
- project_
dir - Return the OS-specific project directories for micromux.
Type Aliases§
- ServiceID
- Unique identifier for a service.