pub struct Manager { /* private fields */ }Expand description
Implements the namespace deployer.
Implementations§
Source§impl Manager
impl Manager
Sourcepub fn new(backend: Box<dyn Backend + Send + Sync>) -> Self
pub fn new(backend: Box<dyn Backend + Send + Sync>) -> Self
Creates a new namespace deployer manager.
Sourcepub fn deployer_type(&self) -> &'static str
pub fn deployer_type(&self) -> &'static str
Returns the deployer type identifier ("namespace").
Sourcepub fn validate(
&self,
deployer_config: &DeployerConfig,
_caproni_config: &CaproniConfig,
) -> Result<(), NamespaceError>
pub fn validate( &self, deployer_config: &DeployerConfig, _caproni_config: &CaproniConfig, ) -> Result<(), NamespaceError>
Validates the namespace deployer configuration.
Sourcepub fn deploy(
&self,
deployer_config: &DeployerConfig,
) -> Result<(), NamespaceError>
pub fn deploy( &self, deployer_config: &DeployerConfig, ) -> Result<(), NamespaceError>
Creates each configured namespace and waits for it to be ready before continuing to the next one.
A missing or empty namespace block is rejected with
NamespaceError::EmptyNamespaces. Manager::validate
catches this at config-load time, but a programmatic caller
that bypasses validation must not see deploy silently
succeed while status reports super::super::State
not-deployed.
Sourcepub fn undeploy(
&self,
deployer_config: &DeployerConfig,
_caproni_config: &CaproniConfig,
) -> Result<(), NamespaceError>
pub fn undeploy( &self, deployer_config: &DeployerConfig, _caproni_config: &CaproniConfig, ) -> Result<(), NamespaceError>
Deletes the configured namespaces when delete_on_undeploy is
set. Otherwise this is a no-op – the namespaces are treated
as shared infrastructure that may still be in use by sibling
deployers.
Sourcepub fn status(
&self,
deployer_config: &DeployerConfig,
_caproni_config: &CaproniConfig,
) -> Result<Status, NamespaceError>
pub fn status( &self, deployer_config: &DeployerConfig, _caproni_config: &CaproniConfig, ) -> Result<Status, NamespaceError>
Returns super::super::State::Deployed only when every
configured namespace exists. Any backend error (other than
“namespace not found”, which the backend handles as a false
result) propagates to the caller.
A missing or empty namespace block is reported as
super::super::State::NotDeployed rather than vacuously
“deployed”.
Trait Implementations§
Source§impl Manager for Manager
Lets the orchestrator drive a namespace Manager through the registry.
impl Manager for Manager
Lets the orchestrator drive a namespace Manager through the registry.
Source§fn deployer_type(&self) -> String
fn deployer_type(&self) -> String
"helm").Source§fn deploy(
&self,
deployer_config: &DeployerConfig,
_cfg: Option<&Container>,
) -> Result<(), Box<dyn Error + Send + Sync>>
fn deploy( &self, deployer_config: &DeployerConfig, _cfg: Option<&Container>, ) -> Result<(), Box<dyn Error + Send + Sync>>
Source§fn undeploy(
&self,
deployer_config: &DeployerConfig,
caproni_config: &CaproniConfig,
) -> Result<(), Box<dyn Error + Send + Sync>>
fn undeploy( &self, deployer_config: &DeployerConfig, caproni_config: &CaproniConfig, ) -> Result<(), Box<dyn Error + Send + Sync>>
Source§fn status(
&self,
deployer_config: &DeployerConfig,
caproni_config: &CaproniConfig,
) -> Result<Status, Box<dyn Error + Send + Sync>>
fn status( &self, deployer_config: &DeployerConfig, caproni_config: &CaproniConfig, ) -> Result<Status, Box<dyn Error + Send + Sync>>
Source§fn validate(
&self,
deployer_config: &DeployerConfig,
caproni_config: &CaproniConfig,
) -> Result<(), Box<dyn Error + Send + Sync>>
fn validate( &self, deployer_config: &DeployerConfig, caproni_config: &CaproniConfig, ) -> Result<(), Box<dyn Error + Send + Sync>>
Ok(()) if valid, or an error describing validation
failures. Files in uncloned repository directories should not
cause validation to fail.Auto Trait Implementations§
impl !RefUnwindSafe for Manager
impl !UnwindSafe for Manager
impl Freeze for Manager
impl Send for Manager
impl Sync for Manager
impl Unpin for Manager
impl UnsafeUnpin for Manager
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more