pub struct WaitUntilGrpcServer { /* private fields */ }Implementations§
Source§impl WaitUntilGrpcServer
impl WaitUntilGrpcServer
pub fn new(provider: Arc<dyn BindingsProviderApi>) -> Self
pub fn into_service(self) -> WaitUntilServiceServer<Self>
Sourcepub async fn trigger_drain_all(
&self,
reason: &str,
timeout_secs: u64,
) -> Result<(), AlienError>
pub async fn trigger_drain_all( &self, reason: &str, timeout_secs: u64, ) -> Result<(), AlienError>
Trigger drain for all registered applications. This is called by the runtime when it’s time to drain (e.g., on SIGTERM or Lambda INVOKE end).
Sourcepub async fn get_total_task_count(&self) -> u32
pub async fn get_total_task_count(&self) -> u32
Get total number of tasks across all applications.
Trait Implementations§
Source§impl Clone for WaitUntilGrpcServer
impl Clone for WaitUntilGrpcServer
Source§fn clone(&self) -> WaitUntilGrpcServer
fn clone(&self) -> WaitUntilGrpcServer
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 WaitUntilService for WaitUntilGrpcServer
impl WaitUntilService for WaitUntilGrpcServer
Source§fn notify_task_registered<'life0, 'async_trait>(
&'life0 self,
request: Request<NotifyTaskRegisteredRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<NotifyTaskRegisteredResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn notify_task_registered<'life0, 'async_trait>(
&'life0 self,
request: Request<NotifyTaskRegisteredRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<NotifyTaskRegisteredResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Application notifies runtime that it has registered a new task.
Source§fn wait_for_drain_signal<'life0, 'async_trait>(
&'life0 self,
request: Request<WaitForDrainSignalRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<WaitForDrainSignalResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn wait_for_drain_signal<'life0, 'async_trait>(
&'life0 self,
request: Request<WaitForDrainSignalRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<WaitForDrainSignalResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Application calls this to wait for a drain signal from runtime.
This is a blocking call that returns when runtime decides it’s time to drain.
Source§fn notify_drain_complete<'life0, 'async_trait>(
&'life0 self,
request: Request<NotifyDrainCompleteRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<NotifyDrainCompleteResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn notify_drain_complete<'life0, 'async_trait>(
&'life0 self,
request: Request<NotifyDrainCompleteRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<NotifyDrainCompleteResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Application notifies runtime that it has completed draining all tasks.
Source§fn get_task_count<'life0, 'async_trait>(
&'life0 self,
request: Request<GetTaskCountRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetTaskCountResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_task_count<'life0, 'async_trait>(
&'life0 self,
request: Request<GetTaskCountRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetTaskCountResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Runtime can query how many tasks are currently registered (for monitoring).
Auto Trait Implementations§
impl Freeze for WaitUntilGrpcServer
impl !RefUnwindSafe for WaitUntilGrpcServer
impl Send for WaitUntilGrpcServer
impl Sync for WaitUntilGrpcServer
impl Unpin for WaitUntilGrpcServer
impl UnsafeUnpin for WaitUntilGrpcServer
impl !UnwindSafe for WaitUntilGrpcServer
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,
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> 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 moreSource§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>
Wrap the input message
T in a tonic::RequestCreates a shared type from an unshared type.