Trait wasmbus_rpc::provider::ProviderHandler [−][src]
pub trait ProviderHandler: Sync {
fn put_link<'life0, 'life1, 'async_trait>(
&'life0 self,
ld: &'life1 LinkDefinition
) -> Pin<Box<dyn Future<Output = Result<bool, RpcError>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
{ ... }
fn delete_link<'life0, 'life1, 'async_trait>(
&'life0 self,
actor_id: &'life1 str
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
{ ... }
fn health_request<'life0, 'life1, 'async_trait>(
&'life0 self,
arg: &'life1 HealthCheckRequest
) -> Pin<Box<dyn Future<Output = Result<HealthCheckResponse, RpcError>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
{ ... }
fn shutdown<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Infallible>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
}
Expand description
CapabilityProvider handling of messages from host The HostBridge handles most messages and forwards the remainder to this handler
Provided methods
Provider should perform any operations needed for a new link, including setting up per-actor resources, and checking authorization. If the link is allowed, return true, otherwise return false to deny the link. This message is idempotent - provider must be able to handle duplicates
Notify the provider that the link is dropped
fn health_request<'life0, 'life1, 'async_trait>(
&'life0 self,
arg: &'life1 HealthCheckRequest
) -> Pin<Box<dyn Future<Output = Result<HealthCheckResponse, RpcError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn health_request<'life0, 'life1, 'async_trait>(
&'life0 self,
arg: &'life1 HealthCheckRequest
) -> Pin<Box<dyn Future<Output = Result<HealthCheckResponse, RpcError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Perform health check. Called at regular intervals by host Default implementation always returns healthy