Skip to main content

Deployment

Struct Deployment 

Source
pub struct Deployment {
    pub implements: BTreeMap<String, Vec<String>>,
    pub interfaces: BTreeMap<String, Vec<Vec<Res>>>,
    pub heartbeats: BTreeSet<String>,
    pub fingerprints: BTreeMap<String, BTreeSet<Fingerprint>>,
    pub catalog: Option<Catalog>,
    pub governed: BTreeSet<String>,
    pub users: BTreeSet<String>,
    pub default_allow: bool,
    pub owner_heartbeats: BTreeSet<String>,
}
Expand description

What the plan needs of the deployment (§2.3): the interfaces each listed service implements, and the revisions given of each interface.

Fields§

§implements: BTreeMap<String, Vec<String>>

A service’s name → the interface ids it implements.

§interfaces: BTreeMap<String, Vec<Vec<Res>>>

An interface id → each revision given of it, as its resources. Two minors of one major are two revisions of one id: an annotation changed between them is a review (core §9.8), and two services of one deployment may run either (core §3.3). The plan reads them together, failing closed where they disagree (§2.3).

§heartbeats: BTreeSet<String>

The interface ids a revision given of which uses freshness.v2: their owners send a heartbeat covering them (freshness.v2 §2.4), which crosses where a collection it covers does (§2.9).

§fingerprints: BTreeMap<String, BTreeSet<Fingerprint>>

An interface id → the fingerprints of the revisions given of it as contracts, which link.v2’s catalog check reads (v2 §2.18). A revision given as its resources alone has none.

§catalog: Option<Catalog>

The catalog the far side decodes with (core §8.6), when the deployment gives it: a link.v2 plan then refuses a crossing revision it does not list (v2 §2.18).

§governed: BTreeSet<String>

The interface ids a revision given of which uses either major of redundancy (crate::redundancy::is_governed): a device implementing one is presence_required (v2 §2.5, 0.29).

§users: BTreeSet<String>

The principals the deployment binds by a usrpwd user name (core §11.1): a face the near router opens binds none of them, so a link.v2 plan refuses one whose far principal is (v2 §2.5).

§default_allow: bool

Whether the routers’ default_permission is allow (core §11.2): a face the near router opens is then planned where its far principal is a user name, and warned of, since the face’s subject, bound by its link protocols, carries the principal’s denies whoever opened (v2 §2.5). Under deny, the default, it is refused.

§owner_heartbeats: BTreeSet<String>

The listed services, by name, whose owner heartbeats the deployment turns on (freshness.v2 §2.4; §2.3, #1145). A link.v1 plan warns of each that implements an interface whose heartbeat crosses a face (owner_heartbeat_denied, §2.9); a link.v2 plan reads none of it, its link owner heartbeat crossing where a heartbeat does.

Implementations§

Source§

impl Deployment

Source

pub fn add_contract(&mut self, c: &Contract)

Adds a contract’s resources as a revision of its interface id, its heartbeat when it uses freshness.v2, and its fingerprint.

Source

pub fn add_revision(&mut self, iface: impl Into<String>, resources: Vec<Res>)

Adds one revision of iface, as its resources.

Trait Implementations§

Source§

impl Clone for Deployment

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

impl Debug for Deployment

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Deployment

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Forget for Deployment

§

impl Freeze for Deployment
where *const LeafNode<String, Vec<String>> is !null: Freeze, PhantomData<(Owned, LeafOrInternal)>: Freeze, PhantomData<Box<(String, Vec<String>)>>: Freeze, *const LeafNode<String, Vec<Vec<Res>>> is !null: Freeze, PhantomData<Box<(String, Vec<Vec<Res>>)>>: Freeze, *const LeafNode<String, SetValZST> is !null: Freeze, PhantomData<Box<(String, SetValZST)>>: Freeze, *const LeafNode<String, BTreeSet<Fingerprint>> is !null: Freeze, PhantomData<Box<(String, BTreeSet<Fingerprint>)>>: Freeze, *const u8 is !null: Freeze, PhantomData<Entry>: Freeze, PhantomData<Ancestor>: Freeze,

§

impl Move for Deployment

§

impl RefUnwindSafe for Deployment

§

impl Send for Deployment
where NodeRef<Owned, String, Vec<String>, LeafOrInternal>: Send, BoxRaw<(String, Vec<String>)>: Send, NodeRef<Owned, String, Vec<Vec<Res>>, LeafOrInternal>: Send, BoxRaw<(String, Vec<Vec<Res>>)>: Send, NodeRef<Owned, String, SetValZST, LeafOrInternal>: Send, BoxRaw<(String, SetValZST)>: Send, NodeRef<Owned, String, BTreeSet<Fingerprint>, LeafOrInternal>: Send, BoxRaw<(String, BTreeSet<Fingerprint>)>: Send, RawVecInner: Send,

§

impl Sync for Deployment
where NodeRef<Owned, String, Vec<String>, LeafOrInternal>: Sync, BoxRaw<(String, Vec<String>)>: Sync, NodeRef<Owned, String, Vec<Vec<Res>>, LeafOrInternal>: Sync, BoxRaw<(String, Vec<Vec<Res>>)>: Sync, NodeRef<Owned, String, SetValZST, LeafOrInternal>: Sync, BoxRaw<(String, SetValZST)>: Sync, NodeRef<Owned, String, BTreeSet<Fingerprint>, LeafOrInternal>: Sync, BoxRaw<(String, BTreeSet<Fingerprint>)>: Sync, RawVecInner: Sync,

§

impl Unpin for Deployment
where *const LeafNode<String, Vec<String>> is !null: Unpin, Box<(String, Vec<String>)>: Unpin, *const LeafNode<String, Vec<Vec<Res>>> is !null: Unpin, Box<(String, Vec<Vec<Res>>)>: Unpin, *const LeafNode<String, SetValZST> is !null: Unpin, Box<(String, SetValZST)>: Unpin, *const LeafNode<String, BTreeSet<Fingerprint>> is !null: Unpin, Box<(String, BTreeSet<Fingerprint>)>: Unpin, *const u8 is !null: Unpin,

§

impl UnsafeUnpin for Deployment

§

impl UnwindSafe for Deployment

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> AsNode<T> for T

Source§

fn as_node(&self) -> &T

Source§

impl<T> AsNodeMut<T> for T

Source§

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

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