Trait ExecutionRuntime

Source
pub trait ExecutionRuntime:
    Send
    + Sync
    + 'static {
    type ListInputProposalsStream: Stream<Item = Result<InputProposal, Status>> + Send + 'static;
    type ListChangeEventsStream: Stream<Item = Result<ChangeValueWithCounter, Status>> + Send + 'static;
    type ListNodeWillExecuteEventsStream: Stream<Item = Result<NodeWillExecuteOnBranch, Status>> + Send + 'static;

Show 17 methods // Required methods fn run_query<'life0, 'async_trait>( &'life0 self, request: Request<QueryAtFrame>, ) -> Pin<Box<dyn Future<Output = Result<Response<QueryAtFrameResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn merge<'life0, 'async_trait>( &'life0 self, request: Request<RequestFileMerge>, ) -> Pin<Box<dyn Future<Output = Result<Response<ExecutionStatus>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn current_file_state<'life0, 'async_trait>( &'life0 self, request: Request<RequestOnlyId>, ) -> Pin<Box<dyn Future<Output = Result<Response<File>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_parquet_history<'life0, 'async_trait>( &'life0 self, request: Request<RequestOnlyId>, ) -> Pin<Box<dyn Future<Output = Result<Response<ParquetFile>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn play<'life0, 'async_trait>( &'life0 self, request: Request<RequestAtFrame>, ) -> Pin<Box<dyn Future<Output = Result<Response<ExecutionStatus>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn pause<'life0, 'async_trait>( &'life0 self, request: Request<RequestAtFrame>, ) -> Pin<Box<dyn Future<Output = Result<Response<ExecutionStatus>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn branch<'life0, 'async_trait>( &'life0 self, request: Request<RequestNewBranch>, ) -> Pin<Box<dyn Future<Output = Result<Response<ExecutionStatus>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn list_branches<'life0, 'async_trait>( &'life0 self, request: Request<RequestListBranches>, ) -> Pin<Box<dyn Future<Output = Result<Response<ListBranchesRes>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn list_registered_graphs<'life0, 'async_trait>( &'life0 self, request: Request<Empty>, ) -> Pin<Box<dyn Future<Output = Result<Response<ListRegisteredGraphsResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn list_input_proposals<'life0, 'async_trait>( &'life0 self, request: Request<RequestOnlyId>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::ListInputProposalsStream>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn respond_to_input_proposal<'life0, 'async_trait>( &'life0 self, request: Request<RequestInputProposalResponse>, ) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn list_change_events<'life0, 'async_trait>( &'life0 self, request: Request<RequestOnlyId>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::ListChangeEventsStream>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn list_node_will_execute_events<'life0, 'async_trait>( &'life0 self, request: Request<RequestOnlyId>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::ListNodeWillExecuteEventsStream>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn poll_custom_node_will_execute_events<'life0, 'async_trait>( &'life0 self, request: Request<FilteredPollNodeWillExecuteEventsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<RespondPollNodeWillExecuteEvents>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn ack_node_will_execute_event<'life0, 'async_trait>( &'life0 self, request: Request<RequestAckNodeWillExecuteEvent>, ) -> Pin<Box<dyn Future<Output = Result<Response<ExecutionStatus>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn push_worker_event<'life0, 'async_trait>( &'life0 self, request: Request<FileAddressedChangeValueWithCounter>, ) -> Pin<Box<dyn Future<Output = Result<Response<ExecutionStatus>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn push_template_partial<'life0, 'async_trait>( &'life0 self, request: Request<UpsertPromptLibraryRecord>, ) -> Pin<Box<dyn Future<Output = Result<Response<ExecutionStatus>, 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 ExecutionRuntimeServer.

Required Associated Types§

Source

type ListInputProposalsStream: Stream<Item = Result<InputProposal, Status>> + Send + 'static

Server streaming response type for the ListInputProposals method.

Source

type ListChangeEventsStream: Stream<Item = Result<ChangeValueWithCounter, Status>> + Send + 'static

Server streaming response type for the ListChangeEvents method.

Source

type ListNodeWillExecuteEventsStream: Stream<Item = Result<NodeWillExecuteOnBranch, Status>> + Send + 'static

Server streaming response type for the ListNodeWillExecuteEvents method.

Required Methods§

Source

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

Source

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

  • Merge a new file - if an existing file is available at the id, will merge the new file into the existing one
Source

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

  • Get the current graph state of a file at a branch and counter position
Source

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

  • Get the parquet history for a specific branch and Id - returns bytes
Source

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

  • Resume execution
Source

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

  • Pause execution
Source

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

  • Split history into a separate branch
Source

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

  • Get all branches
Source

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

  • List all registered files
Source

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

  • Receive a stream of input proposals <- this is a server-side stream
Source

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

  • Push responses to input proposals (these wait for some input from a host until they’re resolved) <- RPC client to server
Source

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

  • Observe the stream of execution events <- this is a server-side stream
Source

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

Source

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

  • Observe when the server thinks our local node implementation should execute and with what changes
Source

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

Source

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

  • Receive events from workers <- this is an RPC client to server, we don’t need to wait for a response from the server
Source

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

Implementors§