pub struct QueryRequest {Show 14 fields
pub query_id: String,
pub tenant_id: String,
pub domain: String,
pub query_type: String,
pub payload: Vec<u8>,
pub context: Option<RequestContext>,
pub min_position: u64,
pub issued_at: i64,
pub client_sig: Option<Signature>,
pub protocol: u32,
pub listener: String,
pub wait_only: bool,
pub target: Option<Target>,
pub deployment: String,
}Expand description
Signed by the client over kernable.v1.query.
Fields§
§query_id: StringChosen by the client (the SDKs use a random UUID); returned in QueryResult. Queries are not stored, so an ID is not checked for reuse.
tenant_id: String§domain: String§query_type: Stringunqualified: GetOrder
payload: Vec<u8>§context: Option<RequestContext>§min_position: u64Answer only after the read model has processed this global position (0: right away), e.g. the position of the last event of a command the client just submitted.
issued_at: i64ms since epoch; must be within 60 s of the kernel’s clock
client_sig: Option<Signature>§protocol: u32not signed
listener: StringSet by SDKs when a listener’s handler asks (not signed); see SubmitRequest.listener. The
query is never routed to that listener, nor to one that could reach min_position only
after that listener, and refused (FAILED_PRECONDITION) if no other read model answers it
or if the listener itself checks the query as a middleware.
wait_only: boolSigned, and only when set: answer nothing; return an empty response once a read model that
answers query_type has processed this kernel’s head (as of the request) and
min_position. Not checked by middleware, and any partition takes it, whatever the
tenant: the SDKs send it to every partition before a query across tenants
(allPartitions), so that its answer holds every event committed before it.
target: Option<Target>Signed, and only when set: the aggregate the query is about, as the query type declares it (the SDKs fill it from the query’s data). A middleware decides on it as on a command’s aggregate, e.g. “only the order’s owner may read it”; the read model answers from the data.
deployment: StringNot signed: the asker’s deployment (code version). The kernel routes the query to a read model of that deployment if one answers it, else to one of the deployment its service’s membership names, else to any. Empty: the membership’s deployment first.
Trait Implementations§
Source§impl Clone for QueryRequest
impl Clone for QueryRequest
Source§impl Debug for QueryRequest
impl Debug for QueryRequest
Source§impl Default for QueryRequest
impl Default for QueryRequest
Source§impl Message for QueryRequest
impl Message for QueryRequest
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 QueryRequest
impl PartialEq for QueryRequest
impl StructuralPartialEq for QueryRequest
Auto Trait Implementations§
impl Forget for QueryRequest
impl Freeze for QueryRequest
impl Move for QueryRequest
impl RefUnwindSafe for QueryRequest
impl Send for QueryRequest
impl Sync for QueryRequest
impl Unpin for QueryRequest
impl UnsafeUnpin for QueryRequest
impl UnwindSafe for QueryRequest
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