pub struct Membership {
pub service: String,
pub workers: Vec<String>,
pub listeners: Vec<String>,
pub middlewares: Vec<String>,
pub metadata: Vec<Attribute>,
pub issued_at: i64,
pub processes: Vec<String>,
pub deployment: String,
}Expand description
What a service consists of. Once a service has one, the kernel waits (readiness) for what it lists, and treats workers and listeners of the service that it does not list as dynamic. Workers and listeners name their service in Register.service and Hello.service. A service without a membership, and a process without a service, count as listed.
- workers: the aggregate types the service runs (qualified:
shop.Cart). Commands of a listed aggregate are accepted, and queued, even before a worker registered it. An aggregate a worker runs but the service does not list is forgotten once its last worker leaves. - listeners: listener names. A listed listener counts for readiness, settling and the order of delivery; an unlisted one keeps its position but counts for nobody.
- middlewares: names of the service’s listeners that check requests; they count like listeners. A listener of the service that is not listed here cannot connect as a middleware, and taking one off the list removes its check: a check never appears or disappears without a signed membership.
Fields§
§service: Stringa name like a domain: letters, digits, - and _
workers: Vec<String>qualified aggregate types
listeners: Vec<String>§middlewares: Vec<String>§metadata: Vec<Attribute>free, e.g. version and description; signed in order
issued_at: i64ms since epoch
processes: Vec<String>Qualified process names (shop.fulfilment); signed only when there are any. A process a
membership no longer lists starts no new cases; its running cases finish.
deployment: StringThe deployment (code version) that serves the service; signed only when set. Its workers run the service’s commands, its listeners count, its middlewares check and its read models answer queries first. Workers and listeners of the service that declare another deployment stay connected: workers idle, read models keep catching up, for a rollback. A rollback applies a membership naming the earlier deployment. Empty: every deployment serves.
Trait Implementations§
Source§impl Clone for Membership
impl Clone for Membership
Source§impl Debug for Membership
impl Debug for Membership
Source§impl Default for Membership
impl Default for Membership
Source§impl Message for Membership
impl Message for Membership
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for Membership
impl PartialEq for Membership
impl StructuralPartialEq for Membership
Auto Trait Implementations§
impl Forget for Membership
impl Freeze for Membership
impl Move for Membership
impl RefUnwindSafe for Membership
impl Send for Membership
impl Sync for Membership
impl Unpin for Membership
impl UnsafeUnpin for Membership
impl UnwindSafe for Membership
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<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