Skip to main content

ProcessServiceClient

Struct ProcessServiceClient 

Source
pub struct ProcessServiceClient<T> { /* private fields */ }
Expand description

Business processes, run by the kernel (design/processes.md).

Implementations§

Source§

impl ProcessServiceClient<Channel>

Source

pub async fn connect<D>(dst: D) -> Result<Self, Error>
where D: TryInto<Endpoint>, D::Error: Into<StdError>,

Attempt to create a new client by connecting to a given endpoint.

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,

Source

pub fn new(inner: T) -> Self

Source

pub fn with_origin(inner: T, origin: Uri) -> Self

Source

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,

Source

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.

Source

pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self

Enable decompressing responses.

Source

pub fn max_decoding_message_size(self, limit: usize) -> Self

Limits the maximum size of a decoded message.

Default: 4MB

Source

pub fn max_encoding_message_size(self, limit: usize) -> Self

Limits the maximum size of an encoded message.

Default: usize::MAX

Source

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).

Source

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).

Source

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).

Source

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>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug> Debug for ProcessServiceClient<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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>

§

impl<T> Send for ProcessServiceClient<T>
where T: Send, BoxRaw<ByteStr>: Send, Bytes: Send,

§

impl<T> Sync for ProcessServiceClient<T>
where T: Sync, BoxRaw<ByteStr>: Sync, Bytes: Sync,

§

impl<T> Unpin for ProcessServiceClient<T>
where T: Unpin, Box<ByteStr>: Unpin, *const u8: Unpin, Align8<*mut ()>: Unpin, &'static Vtable: Unpin,

§

impl<T> UnsafeUnpin for ProcessServiceClient<T>
where T: UnsafeUnpin, *const ByteStr is !null: UnsafeUnpin, PhantomData<ByteStr>: UnsafeUnpin, *const u8: UnsafeUnpin, Align8<*mut ()>: UnsafeUnpin, &'static Vtable: UnsafeUnpin,

§

impl<T> UnwindSafe for ProcessServiceClient<T>
where T: UnwindSafe, BoxRaw<ByteStr>: UnwindSafe, *const u8: UnwindSafe, Align8<*mut ()>: UnwindSafe, &'static Vtable: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more