pub struct Hello {Show 14 fields
pub name: String,
pub key_id: String,
pub order: i32,
pub event_types: Vec<String>,
pub from_position: Option<u64>,
pub query_types: Vec<String>,
pub middlewares: Vec<Middleware>,
pub protocol: u32,
pub service: String,
pub live: bool,
pub instance: String,
pub single: bool,
pub deployment: String,
pub reactor: bool,
}Expand description
The first message of a listener’s stream. A registered listener (not live) is stored under
its name with its key, order, event types and middlewares, and keeps its position across
connections; it counts (see Membership) also while disconnected.
Fields§
§name: Stringunique; one connection per name at a time
key_id: Stringthe key that answers the challenge; registered with the name
order: i32Order of delivery, from 0 (negative orders are reserved for kernable’s kits and need a grant of reserved_order): event N reaches
this listener only after every listener that counts with a lower order acknowledged N.
event_types: Vec<String>qualified (orders.OrderPlaced, orders.*); empty = all the key may read
from_position: Option<u64>Start after this position instead of the stored one, e.g. 0 to rebuild an in-memory read model. Absent: after the stored position, or at the newest event on the first connect, so a new listener never reacts to what happened before it existed.
query_types: Vec<String>qualified query types this listener answers
middlewares: Vec<Middleware>At most one per when; none: not a middleware. A listener of a service with a
membership must be listed in its middlewares.
protocol: u32§service: StringThe service this listener belongs to; its membership (see Membership) decides whether it
counts and whether it may be a middleware. Empty: no service, it always counts.
live: boolNot registered: no stored position, starts at the newest event, does not count for readiness, settling or the order of delivery, and is forgotten when it disconnects. For reactions that only matter while the process runs. Cannot be a middleware, nor use the name of a registered listener.
instance: StringOne of several processes that run this listener under one name, e.g. a read model on
each node of a pair: 1 to 128 letters, digits, -, _ and ., unique in the group. Empty:
the only one, and a second connection of the name is refused. The group counts for
readiness, settling and the order of delivery as one listener: through an event once one
instance acknowledged it, ready once one instance has caught up. Every instance of a group
must agree on single.
single: boolWith instance: one instance at a time gets events, so a reactor’s side effects happen
once; the others get Waiting, and the first of them takes over after the group’s position
when the active one leaves. Without: every instance gets every event, from its own position,
and queries and checks go to any instance that has reached what they need; such an instance
cannot park events. Not for live listeners.
deployment: StringThe code version (deployment) of the process: 1 to 128 letters, digits, -, _ and .;
empty: none. A listener that answers queries or checks requests (a read model or a
middleware) is registered per name and deployment (shown as name@deployment): a new
deployment’s read model has its own position, starts from the first event when the name
already has a position under another deployment, and runs beside the old one; its service’s
membership decides which deployment counts. Any other listener (a reactor) keeps one
registration and position across deployments, so a new deployment goes on where the old
one stopped and nothing is handled twice.
reactor: boolThe listener acts outward (a reactor, as the SDKs register one): a reader, a read-only copy
of the writer, delivers nothing to it and answers Waiting with reader_of, so the same
code runs beside a reader and only the writer’s reactors act.
Implementations§
Trait Implementations§
Source§impl Message for Hello
impl Message for Hello
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.impl StructuralPartialEq for Hello
Auto Trait Implementations§
impl Forget for Hello
impl Freeze for Hello
impl Move for Hello
impl RefUnwindSafe for Hello
impl Send for Hello
impl Sync for Hello
impl Unpin for Hello
impl UnsafeUnpin for Hello
impl UnwindSafe for Hello
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