Trait Plugin Worker
Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker.
pub trait PluginWorker:
Send
+ Sync
+ 'static {
type InvokeStreamStream: Stream<Item = Result<StreamChunk, Status>> + Send + 'static;
// Required methods
fn handshake<'life0, 'async_trait>(
&'life0 self,
request: Request<HandshakeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<HandshakeResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn health<'life0, 'async_trait>(
&'life0 self,
request: Request<HealthRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<HealthResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn validate<'life0, 'async_trait>(
&'life0 self,
request: Request<ValidateRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ValidateResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn register<'life0, 'async_trait>(
&'life0 self,
request: Request<RegisterRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<RegisterResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn invoke<'life0, 'async_trait>(
&'life0 self,
request: Request<InvokeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<InvokeResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn invoke_stream<'life0, 'async_trait>(
&'life0 self,
request: Request<InvokeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::InvokeStreamStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn cancel_invocation<'life0, 'async_trait>(
&'life0 self,
request: Request<CancelInvocationRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<WorkerAck>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn shutdown<'life0, 'async_trait>(
&'life0 self,
request: Request<ShutdownRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<WorkerAck>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Generated trait containing gRPC methods that should be implemented for use with PluginWorkerServer.
Required Associated Types
InvokeStreamStream
type InvokeStreamStream: Stream<Item = Result<StreamChunk, Status>> + Send + 'static
Server streaming response type for the InvokeStream method.
Required Methods
handshake
fn handshake<'life0, 'async_trait>(
&'life0 self,
request: Request<HandshakeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<HandshakeResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
health
fn health<'life0, 'async_trait>(
&'life0 self,
request: Request<HealthRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<HealthResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
validate
fn validate<'life0, 'async_trait>(
&'life0 self,
request: Request<ValidateRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ValidateResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
register
fn register<'life0, 'async_trait>(
&'life0 self,
request: Request<RegisterRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<RegisterResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
invoke
fn invoke<'life0, 'async_trait>(
&'life0 self,
request: Request<InvokeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<InvokeResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
invoke_stream
fn invoke_stream<'life0, 'async_trait>(
&'life0 self,
request: Request<InvokeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::InvokeStreamStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
cancel_invocation
fn cancel_invocation<'life0, 'async_trait>(
&'life0 self,
request: Request<CancelInvocationRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<WorkerAck>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
shutdown
fn shutdown<'life0, 'async_trait>(
&'life0 self,
request: Request<ShutdownRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<WorkerAck>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,