Skip to main content

Manager

Struct Manager 

Source
pub struct Manager { /* private fields */ }
Expand description

Implements the namespace deployer.

Implementations§

Source§

impl Manager

Source

pub fn new(backend: Box<dyn Backend + Send + Sync>) -> Self

Creates a new namespace deployer manager.

Source

pub fn deployer_type(&self) -> &'static str

Returns the deployer type identifier ("namespace").

Source

pub fn validate( &self, deployer_config: &DeployerConfig, _caproni_config: &CaproniConfig, ) -> Result<(), NamespaceError>

Validates the namespace deployer configuration.

Source

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.

Source

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.

Source

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.

Source§

fn deployer_type(&self) -> String

The deployer type that this manager handles (e.g. "helm").
Source§

fn deploy( &self, deployer_config: &DeployerConfig, _cfg: Option<&Container>, ) -> Result<(), Box<dyn Error + Send + Sync>>

Deploys the application to the cluster. If the application is already deployed, this updates it to match the current configuration.
Source§

fn undeploy( &self, deployer_config: &DeployerConfig, caproni_config: &CaproniConfig, ) -> Result<(), Box<dyn Error + Send + Sync>>

Removes this deployment from the cluster.
Source§

fn status( &self, deployer_config: &DeployerConfig, caproni_config: &CaproniConfig, ) -> Result<Status, Box<dyn Error + Send + Sync>>

Returns the current status of the deployment. Returns an error if unable to determine deployment state.
Source§

fn validate( &self, deployer_config: &DeployerConfig, caproni_config: &CaproniConfig, ) -> Result<(), Box<dyn Error + Send + Sync>>

Validates the deployer configuration and referenced files. Returns Ok(()) if valid, or an error describing validation failures. Files in uncloned repository directories should not cause validation to fail.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more