pub enum SequencerRequest {
ReserveFlow {
source: Resource,
destination: Resource,
},
ReleaseFlow {
destination: Resource,
},
}
Expand description
Sequencer service request types.
Internal API for the sequencer service, which manages resource reservations and flow coordination to prevent race conditions and ensure consistent ordering of operations across the distributed system.
Variants§
ReserveFlow
Reserve exclusive access for a data flow from source to destination.
Prevents concurrent modifications to the destination resource while a flow is being processed, ensuring data consistency and atomic operations.
Fields
ReleaseFlow
Release a previously reserved flow to allow subsequent operations.
Must be called after flow completion to free the destination resource for other operations and maintain system throughput.
Trait Implementations§
Source§impl Clone for SequencerRequest
impl Clone for SequencerRequest
Source§fn clone(&self) -> SequencerRequest
fn clone(&self) -> SequencerRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SequencerRequest
impl Debug for SequencerRequest
Source§impl Service<SequencerRequest> for SequencerService
impl Service<SequencerRequest> for SequencerService
Source§type Response = SequencerResponse
type Response = SequencerResponse
Responses given by the service.
Source§type Error = TraceabilityError
type Error = TraceabilityError
Errors produced by the service.
Source§type Future = Pin<Box<dyn Future<Output = Result<<SequencerService as Service<SequencerRequest>>::Response, <SequencerService as Service<SequencerRequest>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<SequencerService as Service<SequencerRequest>>::Response, <SequencerService as Service<SequencerRequest>>::Error>> + Send>>
The future response value.
Source§fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
Returns
Poll::Ready(Ok(()))
when the service is able to process requests. Read moreSource§fn call(&mut self, request: SequencerRequest) -> Self::Future
fn call(&mut self, request: SequencerRequest) -> Self::Future
Process the request and return the response asynchronously. Read more
Source§impl<T> Service<SequencerRequest> for WaitingQueueService<T>where
T: Service<SequencerRequest, Response = SequencerResponse, Error = TraceabilityError> + Clone + Sync + Send + 'static,
T::Future: Send,
impl<T> Service<SequencerRequest> for WaitingQueueService<T>where
T: Service<SequencerRequest, Response = SequencerResponse, Error = TraceabilityError> + Clone + Sync + Send + 'static,
T::Future: Send,
Source§type Response = <T as Service<SequencerRequest>>::Response
type Response = <T as Service<SequencerRequest>>::Response
Responses given by the service.
Source§type Error = <T as Service<SequencerRequest>>::Error
type Error = <T as Service<SequencerRequest>>::Error
Errors produced by the service.
Source§type Future = Pin<Box<dyn Future<Output = Result<<WaitingQueueService<T> as Service<SequencerRequest>>::Response, <WaitingQueueService<T> as Service<SequencerRequest>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<WaitingQueueService<T> as Service<SequencerRequest>>::Response, <WaitingQueueService<T> as Service<SequencerRequest>>::Error>> + Send>>
The future response value.
Source§fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
Returns
Poll::Ready(Ok(()))
when the service is able to process requests. Read moreSource§fn call(&mut self, req: SequencerRequest) -> Self::Future
fn call(&mut self, req: SequencerRequest) -> Self::Future
Process the request and return the response asynchronously. Read more
Auto Trait Implementations§
impl Freeze for SequencerRequest
impl RefUnwindSafe for SequencerRequest
impl Send for SequencerRequest
impl Sync for SequencerRequest
impl Unpin for SequencerRequest
impl UnwindSafe for SequencerRequest
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
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
].