pub struct WorkloadConfig {
pub enabled: bool,
pub provider: String,
pub default_labels: HashMap<String, String>,
}Expand description
Provider-agnostic workload configuration.
Fields§
§enabled: boolWhether the workload component is active. When false, the component starts as a healthy no-op
and builds no backend.
provider: StringBackend name looked up in an injected crate::WorkloadRegistry.
default_labels: HashMap<String, String>Labels applied to every workload the manager deploys.
Implementations§
Source§impl WorkloadConfig
impl WorkloadConfig
Sourcepub fn apply_defaults(&mut self)
pub fn apply_defaults(&mut self)
Normalize provider by trimming surrounding whitespace, filling it with the default when empty,
so stored and logged config is deterministic.
Trait Implementations§
Source§impl Clone for WorkloadConfig
impl Clone for WorkloadConfig
Source§fn clone(&self) -> WorkloadConfig
fn clone(&self) -> WorkloadConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WorkloadConfig
impl Debug for WorkloadConfig
Source§impl Default for WorkloadConfig
impl Default for WorkloadConfig
Source§impl<'de> Deserialize<'de> for WorkloadConfigwhere
WorkloadConfig: Default,
impl<'de> Deserialize<'de> for WorkloadConfigwhere
WorkloadConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for WorkloadConfig
Source§impl PartialEq for WorkloadConfig
impl PartialEq for WorkloadConfig
Source§impl Serialize for WorkloadConfig
impl Serialize for WorkloadConfig
impl StructuralPartialEq for WorkloadConfig
Auto Trait Implementations§
impl Freeze for WorkloadConfig
impl RefUnwindSafe for WorkloadConfig
impl Send for WorkloadConfig
impl Sync for WorkloadConfig
impl Unpin for WorkloadConfig
impl UnsafeUnpin for WorkloadConfig
impl UnwindSafe for WorkloadConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more