pub struct Manifest { /* private fields */ }Expand description
What a service consists of, for Kernable::apply; see Membership in kernable.proto.
Built with methods that each return the changed manifest:
Manifest::new().service("shop").worker(&cart_aggregate).listener(&carts_readmodel).metadata("version", "1.0.0").
Implementations§
Source§impl Manifest
impl Manifest
Sourcepub fn service(self, service: impl Into<String>) -> Manifest
pub fn service(self, service: impl Into<String>) -> Manifest
The service it is for. Default: the connection’s (Options::service).
Sourcepub fn worker<S: State>(self, aggregate: &Aggregate<S>) -> Manifest
pub fn worker<S: State>(self, aggregate: &Aggregate<S>) -> Manifest
An aggregate the service runs: the kernel waits for a worker of it and accepts its commands even before a worker registered it.
Sourcepub fn listener(self, listener: &Listener) -> Manifest
pub fn listener(self, listener: &Listener) -> Manifest
A listener the kernel waits for; the service’s other listeners count for nobody.
Sourcepub fn middleware(self, listener: &Listener) -> Manifest
pub fn middleware(self, listener: &Listener) -> Manifest
A listener of the service that may check requests; it counts like a listener.
Sourcepub fn process(self, process: &Process) -> Manifest
pub fn process(self, process: &Process) -> Manifest
A business process of the service (Domain::process): the kernel starts new cases of
it while a membership lists it; one no longer listed starts none, its running cases
finish. Register it too (Kernable::register_process); an app does both.
Sourcepub fn metadata(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> Manifest
pub fn metadata( self, key: impl Into<String>, value: impl Into<String>, ) -> Manifest
Free metadata, e.g. ("version", "1.0.0"); kept in the order given.
Sourcepub fn deployment(self, deployment: impl Into<String>) -> Manifest
pub fn deployment(self, deployment: impl Into<String>) -> Manifest
The deployment that serves the service: its workers run the commands, its listeners
count and its read models answer queries first; the service’s workers of other
deployments get no commands, their read models keep catching up. A rollback applies a
membership naming the earlier deployment. Default: the connection’s
(Options::deployment); empty: every deployment serves.
Trait Implementations§
impl Eq for Manifest
impl StructuralPartialEq for Manifest
Auto Trait Implementations§
impl Forget for Manifest
impl Freeze for Manifest
impl Move for Manifest
impl RefUnwindSafe for Manifest
impl Send for Manifest
impl Sync for Manifest
impl Unpin for Manifest
impl UnsafeUnpin for Manifest
impl UnwindSafe for Manifest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request