Module background

Module background 

Source
Expand description

Background Process Manager

Manages long-running background processes like kubectl port-forward. Processes run asynchronously and can be started, stopped, and listed.

§Example

use syncable_cli::agent::tools::background::BackgroundProcessManager;

let manager = BackgroundProcessManager::new();

// Start a port-forward in the background
let port = manager.start_port_forward(
    "prometheus",
    "svc/prometheus-server",
    "monitoring",
    9090
).await?;

println!("Port-forward running on localhost:{}", port);

// Later, stop it
manager.stop("prometheus").await?;

Structs§

BackgroundProcessManager
Manages background processes like port-forwards.
ProcessInfo
Information about a running background process.

Enums§

BackgroundProcessError
Error type for background process operations.