Trait dapr::dapr::dapr::proto::runtime::v1::app_callback_server::AppCallback
source · pub trait AppCallback: Send + Sync + 'static {
// Required methods
fn on_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 list_topic_subscriptions<'life0, 'async_trait>(
&'life0 self,
request: Request<()>
) -> Pin<Box<dyn Future<Output = Result<Response<ListTopicSubscriptionsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn on_topic_event<'life0, 'async_trait>(
&'life0 self,
request: Request<TopicEventRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<TopicEventResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_input_bindings<'life0, 'async_trait>(
&'life0 self,
request: Request<()>
) -> Pin<Box<dyn Future<Output = Result<Response<ListInputBindingsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn on_binding_event<'life0, 'async_trait>(
&'life0 self,
request: Request<BindingEventRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<BindingEventResponse>, 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 AppCallbackServer.
Required Methods§
sourcefn on_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 on_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,
Invokes service method with InvokeRequest.
sourcefn list_topic_subscriptions<'life0, 'async_trait>(
&'life0 self,
request: Request<()>
) -> Pin<Box<dyn Future<Output = Result<Response<ListTopicSubscriptionsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_topic_subscriptions<'life0, 'async_trait>(
&'life0 self,
request: Request<()>
) -> Pin<Box<dyn Future<Output = Result<Response<ListTopicSubscriptionsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Lists all topics subscribed by this app.
sourcefn on_topic_event<'life0, 'async_trait>(
&'life0 self,
request: Request<TopicEventRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<TopicEventResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_topic_event<'life0, 'async_trait>(
&'life0 self,
request: Request<TopicEventRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<TopicEventResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Subscribes events from Pubsub
sourcefn list_input_bindings<'life0, 'async_trait>(
&'life0 self,
request: Request<()>
) -> Pin<Box<dyn Future<Output = Result<Response<ListInputBindingsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_input_bindings<'life0, 'async_trait>(
&'life0 self,
request: Request<()>
) -> Pin<Box<dyn Future<Output = Result<Response<ListInputBindingsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Lists all input bindings subscribed by this app.
sourcefn on_binding_event<'life0, 'async_trait>(
&'life0 self,
request: Request<BindingEventRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<BindingEventResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_binding_event<'life0, 'async_trait>(
&'life0 self,
request: Request<BindingEventRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<BindingEventResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Listens events from the input bindings
User application can save the states or send the events to the output bindings optionally by returning BindingEventResponse.