pub struct ProcessServiceClient<T> { /* private fields */ }Expand description
Business processes, run by the kernel (design/processes.md).
Implementations§
Source§impl<T> ProcessServiceClient<T>where
T: GrpcService<Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> ProcessServiceClient<T>where
T: GrpcService<Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ProcessServiceClient<InterceptedService<T, F>>where
F: Interceptor,
T::ResponseBody: Default,
T: Service<Request<Body>, Response = Response<<T as GrpcService<Body>>::ResponseBody>>,
<T as Service<Request<Body>>>::Error: Into<StdError> + Send + Sync,
Sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
Sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
Sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
Sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
Sourcepub async fn register(
&mut self,
request: impl IntoRequest<ProcessRegistration>,
) -> Result<Response<ProcessRegistered>, Status>
pub async fn register( &mut self, request: impl IntoRequest<ProcessRegistration>, ) -> Result<Response<ProcessRegistered>, Status>
Registers a process model (JSON, see design/processes.md “The model format”). Signed over
kernable.v1.process by a key granted process for the process’s qualified name, and
submit for each command, query for each query and listen for each event the model
names; valid 60 s around issued_at. A model equal to the newest version registers nothing
new; a different one becomes the next version. Running cases stay on their version.
Errors: UNAUTHENTICATED, PERMISSION_DENIED, INVALID_ARGUMENT (the model is invalid: the
message names the step and why; a command type no worker registered and no membership lists).
Sourcepub async fn remove(
&mut self,
request: impl IntoRequest<ProcessRemoval>,
) -> Result<Response<ProcessRemoved>, Status>
pub async fn remove( &mut self, request: impl IntoRequest<ProcessRemoval>, ) -> Result<Response<ProcessRemoved>, Status>
Removes a process: it starts no new cases, its running cases finish (as when a membership
no longer lists it). Signed over kernable.v1.process_remove by a key granted process for
it; valid 60 s around issued_at. A later registration makes it active again. Errors:
UNAUTHENTICATED, PERMISSION_DENIED, NOT_FOUND (no such process).
Sourcepub async fn resolve(
&mut self,
request: impl IntoRequest<ProcessResolution>,
) -> Result<Response<ProcessResolved>, Status>
pub async fn resolve( &mut self, request: impl IntoRequest<ProcessResolution>, ) -> Result<Response<ProcessResolved>, Status>
Resolves a case’s incident (design/processes.md, “Incidents”): retry runs its step again
(a new attempt), skip goes on to the step’s next (refused for a step without a single
next), cancel ends the case with the end cancelled (also a case without an incident).
Signed over kernable.v1.process_resolve by a key granted process for the process; valid
60 s around issued_at. Errors: UNAUTHENTICATED, PERMISSION_DENIED, NOT_FOUND (no such
running case), FAILED_PRECONDITION (no incident to retry or skip; a step without a single
next; the case’s ID names cases of several tenants: give the tenant).
Sourcepub async fn act(
&mut self,
request: impl IntoRequest<ProcessActing>,
) -> Result<Response<ProcessActed>, Status>
pub async fn act( &mut self, request: impl IntoRequest<ProcessActing>, ) -> Result<Response<ProcessActed>, Status>
Sets as whom the process acts (design/processes.md, “With the kit”): the sender tenant,
identity and session of context go with every command and query the engine sends for
the process from now on (its correlation and causation stay the engine’s). Kept with the
process’s state, replicated to the standby and to every partition. Without it a process
acts as process:<name>. Idempotent. Signed over kernable.v1.process_act by a key granted
process for it; valid 60 s around issued_at. Errors: UNAUTHENTICATED, PERMISSION_DENIED,
NOT_FOUND (no such process), FAILED_PRECONDITION (a partition that takes its processes
from the control partition).
Trait Implementations§
Source§impl<T: Clone> Clone for ProcessServiceClient<T>
impl<T: Clone> Clone for ProcessServiceClient<T>
Auto Trait Implementations§
impl<T> !Freeze for ProcessServiceClient<T>
impl<T> Forget for ProcessServiceClient<T>
impl<T> Move for ProcessServiceClient<T>
impl<T> RefUnwindSafe for ProcessServiceClient<T>where
Grpc<T>: RefUnwindSafe,
impl<T> Send for ProcessServiceClient<T>
impl<T> Sync for ProcessServiceClient<T>
impl<T> Unpin for ProcessServiceClient<T>
impl<T> UnsafeUnpin for ProcessServiceClient<T>where
Grpc<T>: UnsafeUnpin,
impl<T> UnwindSafe for ProcessServiceClient<T>where
Grpc<T>: UnwindSafe,
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