pub trait WaitUntilService:
Send
+ Sync
+ 'static {
// Required methods
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 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 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 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;
}Expand description
Generated trait containing gRPC methods that should be implemented for use with WaitUntilServiceServer.
Required Methods§
Sourcefn 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 the Worker runtime that it has registered a new task.
Sourcefn 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 the Worker runtime. This is a blocking call that returns when the Worker runtime decides it’s time to drain.
Sourcefn 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 the Worker runtime that it has completed draining all tasks.
Sourcefn 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,
Worker runtime can query how many tasks are currently registered (for monitoring).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".