1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//! Provider-based workload orchestration.
//!
//! `rskit-workload` mirrors gokit's `workload` package:
//! a provider-agnostic [`Manager`] contract for deploying
//! and managing workloads (containers, pods, or any long-running unit),
//! an explicit backend [`WorkloadRegistry`],
//! and a lifecycle-managed [`WorkloadComponent`] that plugs into the shared component registry.
//!
//! The crate is foundational: it owns the *concept and vocabulary* of workload orchestration.
//! Concrete backends (Docker, Kubernetes, …) live in separate adapter crates
//! and register a [`ManagerFactory`] into a [`WorkloadRegistry`]; no backend is wired in implicitly.
//!
//! # Example
//!
//! ```rust
//! use rskit_workload::{WorkloadComponent, WorkloadConfig};
//! use rskit_component::Component;
//!
//! # #[tokio::main]
//! # async fn main() -> rskit_errors::AppResult<()> {
//! // Disabled config starts as a healthy no-op until a backend is registered.
//! let component = WorkloadComponent::new(WorkloadConfig::default());
//! component.start().await?;
//! assert!(component.health().is_healthy());
//! component.stop().await?;
//! # Ok(())
//! # }
//! ```
/// Lifecycle-managed workload component.
/// Provider-agnostic workload configuration.
/// Workload lifecycle manager and optional capability traits.
/// Explicit workload backend registry.
/// Runtime state and result reports.
/// CPU and memory quantity parsing and formatting.
/// Deployment request and its nested specification types.
/// Workload runtime state and restart policy.
pub use WorkloadComponent;
pub use WorkloadConfig;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;