Skip to main content

StackMeta

Struct StackMeta 

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

The per-stack settings and records, for every org.

Implementations§

Source§

impl StackMeta

Source

pub fn new(state: &Path) -> StackMeta

Under the daemon’s state directory.

Source

pub fn exists(&self, org: &OrgId, name: &str) -> bool

Whether anything is kept for the stack.

Source

pub fn remove(&self, org: &OrgId, name: &str) -> Result<()>

Forget everything kept for a removed stack.

Source

pub fn env(&self, org: &OrgId, name: &str) -> Result<String>

The stack’s environment as stored (.env text; empty: none).

Source

pub fn set_env(&self, org: &OrgId, name: &str, text: &str) -> Result<()>

Source

pub fn domains( &self, org: &OrgId, name: &str, ) -> Result<BTreeMap<String, Vec<DomainSpec>>>

The stack’s managed domains per service.

Source

pub fn set_domains( &self, org: &OrgId, name: &str, domains: &BTreeMap<String, Vec<DomainSpec>>, ) -> Result<()>

Source

pub fn deployments(&self, org: &OrgId, name: &str) -> Result<Vec<Deployment>>

The stack’s deployments, newest first.

Source

pub fn deployment(&self, org: &OrgId, name: &str, id: u64) -> Result<Deployment>

Source

pub fn start(&self, org: &OrgId, d: Deployment) -> Result<Deployment>

Record a new deployment, deploying from now: numbered after the newest, which is superseded if it has not settled. Old records past KEEP_DEPLOYMENTS are pruned.

Source

pub fn fail( &self, org: &OrgId, name: &str, id: u64, error: &str, ) -> Result<Deployment>

Mark a deployment failed (the controller refused it).

Source

pub fn recover(&self)

Deployments a stopped daemon left unfinished are marked failed.

Source

pub fn watch( &self, ctl: Controller, org: OrgId, name: String, id: u64, timeout: Duration, )

Follow deployment id of org/name in a thread until its rollout settles, collecting the stack’s events into it.

Trait Implementations§

Source§

impl Clone for StackMeta

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

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

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

Source§

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

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V