Skip to main content

FlowService

Trait FlowService 

Source
pub trait FlowService:
    Send
    + Sync
    + 'static {
Show 29 methods // Required methods fn get_server_info<'life0, 'async_trait>( &'life0 self, request: Request<()>, ) -> Pin<Box<dyn Future<Output = Result<Response<ServerInfo>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn start_flow<'life0, 'async_trait>( &'life0 self, request: Request<StartFlowRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<StartFlowResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn publish_to_channel<'life0, 'async_trait>( &'life0 self, request: Request<PublishToChannelRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_channel_messages<'life0, 'async_trait>( &'life0 self, request: Request<GetChannelMessagesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<GetChannelMessagesResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn delete_channel_message<'life0, 'async_trait>( &'life0 self, request: Request<DeleteChannelMessageRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn write_stream<'life0, 'async_trait>( &'life0 self, request: Request<WriteStreamRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn read_stream<'life0, 'async_trait>( &'life0 self, request: Request<ReadStreamRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<ReadStreamResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn list_stream_messages<'life0, 'async_trait>( &'life0 self, request: Request<ListStreamMessagesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<ListStreamMessagesResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn stop_flow<'life0, 'async_trait>( &'life0 self, request: Request<StopFlowRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_attributes<'life0, 'async_trait>( &'life0 self, request: Request<GetAttributesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<GetAttributesResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn set_attributes<'life0, 'async_trait>( &'life0 self, request: Request<SetAttributesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn load_blobs<'life0, 'async_trait>( &'life0 self, request: Request<LoadBlobsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<LoadBlobsResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn wait_for_flow<'life0, 'async_trait>( &'life0 self, request: Request<WaitForFlowRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<FlowResult>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn search_flows<'life0, 'async_trait>( &'life0 self, request: Request<SearchFlowsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<SearchFlowsResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn sync_attribute_indexes<'life0, 'async_trait>( &'life0 self, request: Request<SyncAttributeIndexRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<SyncAttributeIndexResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_flow_summary<'life0, 'async_trait>( &'life0 self, request: Request<GetFlowSummaryRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<GetFlowSummaryResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_history_events<'life0, 'async_trait>( &'life0 self, request: Request<GetHistoryEventsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<GetHistoryEventsResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn wait_for_history_event<'life0, 'async_trait>( &'life0 self, request: Request<WaitForHistoryEventRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<WaitForHistoryEventResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_flow_state<'life0, 'async_trait>( &'life0 self, request: Request<GetFlowStateRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<GetFlowStateResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn reset_flow<'life0, 'async_trait>( &'life0 self, request: Request<ResetFlowRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<ResetFlowResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn invoke_rpc<'life0, 'async_trait>( &'life0 self, request: Request<InvokeRpcRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<InvokeRpcResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn skip_timer<'life0, 'async_trait>( &'life0 self, request: Request<SkipTimerRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn update_flow_config<'life0, 'async_trait>( &'life0 self, request: Request<UpdateFlowConfigRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn wait_for_step_completion<'life0, 'async_trait>( &'life0 self, request: Request<WaitForStepCompletionRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<WaitForStepCompletionResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn wait_for_attribute<'life0, 'async_trait>( &'life0 self, request: Request<WaitForAttributeRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<WaitForAttributeResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn health_check<'life0, 'async_trait>( &'life0 self, request: Request<()>, ) -> Pin<Box<dyn Future<Output = Result<Response<HealthInfo>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn upload_flow_definitions<'life0, 'async_trait>( &'life0 self, request: Request<UploadFlowDefinitionsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<UploadFlowDefinitionsResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn list_flow_definitions<'life0, 'async_trait>( &'life0 self, request: Request<ListFlowDefinitionsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<ListFlowDefinitionsResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_flow_definitions<'life0, 'async_trait>( &'life0 self, request: Request<GetFlowDefinitionsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<GetFlowDefinitionsResponse>, 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 FlowServiceServer.

Required Methods§

Source

fn get_server_info<'life0, 'async_trait>( &'life0 self, request: Request<()>, ) -> Pin<Box<dyn Future<Output = Result<Response<ServerInfo>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns diagnostic release metadata and the Server’s inclusive protocol interval.

Source

fn start_flow<'life0, 'async_trait>( &'life0 self, request: Request<StartFlowRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<StartFlowResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn publish_to_channel<'life0, 'async_trait>( &'life0 self, request: Request<PublishToChannelRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_channel_messages<'life0, 'async_trait>( &'life0 self, request: Request<GetChannelMessagesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<GetChannelMessagesResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn delete_channel_message<'life0, 'async_trait>( &'life0 self, request: Request<DeleteChannelMessageRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn write_stream<'life0, 'async_trait>( &'life0 self, request: Request<WriteStreamRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn read_stream<'life0, 'async_trait>( &'life0 self, request: Request<ReadStreamRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<ReadStreamResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn list_stream_messages<'life0, 'async_trait>( &'life0 self, request: Request<ListStreamMessagesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<ListStreamMessagesResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn stop_flow<'life0, 'async_trait>( &'life0 self, request: Request<StopFlowRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_attributes<'life0, 'async_trait>( &'life0 self, request: Request<GetAttributesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<GetAttributesResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn set_attributes<'life0, 'async_trait>( &'life0 self, request: Request<SetAttributesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn load_blobs<'life0, 'async_trait>( &'life0 self, request: Request<LoadBlobsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<LoadBlobsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn wait_for_flow<'life0, 'async_trait>( &'life0 self, request: Request<WaitForFlowRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<FlowResult>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn search_flows<'life0, 'async_trait>( &'life0 self, request: Request<SearchFlowsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<SearchFlowsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn sync_attribute_indexes<'life0, 'async_trait>( &'life0 self, request: Request<SyncAttributeIndexRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<SyncAttributeIndexResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_flow_summary<'life0, 'async_trait>( &'life0 self, request: Request<GetFlowSummaryRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<GetFlowSummaryResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_history_events<'life0, 'async_trait>( &'life0 self, request: Request<GetHistoryEventsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<GetHistoryEventsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn wait_for_history_event<'life0, 'async_trait>( &'life0 self, request: Request<WaitForHistoryEventRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<WaitForHistoryEventResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_flow_state<'life0, 'async_trait>( &'life0 self, request: Request<GetFlowStateRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<GetFlowStateResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn reset_flow<'life0, 'async_trait>( &'life0 self, request: Request<ResetFlowRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<ResetFlowResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn invoke_rpc<'life0, 'async_trait>( &'life0 self, request: Request<InvokeRpcRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<InvokeRpcResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn skip_timer<'life0, 'async_trait>( &'life0 self, request: Request<SkipTimerRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn update_flow_config<'life0, 'async_trait>( &'life0 self, request: Request<UpdateFlowConfigRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn wait_for_step_completion<'life0, 'async_trait>( &'life0 self, request: Request<WaitForStepCompletionRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<WaitForStepCompletionResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn wait_for_attribute<'life0, 'async_trait>( &'life0 self, request: Request<WaitForAttributeRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<WaitForAttributeResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn health_check<'life0, 'async_trait>( &'life0 self, request: Request<()>, ) -> Pin<Box<dyn Future<Output = Result<Response<HealthInfo>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn upload_flow_definitions<'life0, 'async_trait>( &'life0 self, request: Request<UploadFlowDefinitionsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<UploadFlowDefinitionsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Stores Flow Definition Graph (FDG 2.0) JSON documents, one for each Flow type.

Workers call it at startup so that Dex Web can render their Flows without a definition directory. The server keeps one document for each Flow type and decides each item separately. The outcome is CREATED when no document was stored for the Flow type. It is UNCHANGED when the stored document has the same SHA-256 digest; nothing is written then. It is REPLACED when the digest differs and generated_at is strictly later than the stored generated_at, compared at microsecond precision, or when force is set. Otherwise it is KEPT_EXISTING: the stored document stays, and the result reports its digest and generation time.

Items are independent. Concurrent uploads of one Flow type are safe: each item’s outcome is decided against the document stored when its write commits. If the call fails partway, earlier items may already be stored; repeating the call is safe and reports them as UNCHANGED.

The server checks only that each document is a JSON object of at most flowDefinitions.maxDefinitionBytes, that its schemaVersion starts with “2.”, and that its flow.name equals flow_type. Dex Web validates the full graph when it reads it.

Fails with InvalidArgument and FLOW_DEFINITION_INVALID, before storing anything, for an invalid item, more than 256 items, a repeated flow_type, a missing generated_at, or a generated_at more than 24 hours after the server’s clock. Fails with Unavailable when object storage fails; the call is then safe to retry.

Source

fn list_flow_definitions<'life0, 'async_trait>( &'life0 self, request: Request<ListFlowDefinitionsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<ListFlowDefinitionsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Lists the Flow types that have a stored definition, one page at a time.

It returns names only; call GetFlowDefinitions for content and metadata. Pages follow the order of the stored object keys, which is stable but is not exactly the order of Flow types. A Flow type first stored during a listing may or may not appear. Fails with InvalidArgument for a negative page_size or an invalid page token, and with Unavailable when object storage fails.

Source

fn get_flow_definitions<'life0, 'async_trait>( &'life0 self, request: Request<GetFlowDefinitionsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<GetFlowDefinitionsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the stored Flow definitions of the requested Flow types, with content.

A requested Flow type that has no stored definition is left out of the response. Fails with InvalidArgument and FLOW_DEFINITION_INVALID for no Flow types, more than 256, or an invalid Flow type. Fails with ResourceExhausted and FLOW_DEFINITION_RESPONSE_TOO_LARGE when the content would not fit in one response message; request fewer Flow types.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§