pub struct NodeExecutor { /* private fields */ }Expand description
Node Executor
Executes workflow node calls through the transport layer with support for timeout, retry, and callback handling.
Implementations§
Source§impl NodeExecutor
impl NodeExecutor
Sourcepub fn new(router: Arc<NodeRouter>, registry: Arc<RegistryService>) -> Self
pub fn new(router: Arc<NodeRouter>, registry: Arc<RegistryService>) -> Self
Create a new node executor
Sourcepub fn with_config(
router: Arc<NodeRouter>,
registry: Arc<RegistryService>,
config: NodeExecutionConfig,
) -> Self
pub fn with_config( router: Arc<NodeRouter>, registry: Arc<RegistryService>, config: NodeExecutionConfig, ) -> Self
Create with custom configuration
Sourcepub async fn execute(
&self,
node_id: &str,
context: NodeContext,
) -> Result<NodeExecutionResult, NodeExecutorError>
pub async fn execute( &self, node_id: &str, context: NodeContext, ) -> Result<NodeExecutionResult, NodeExecutorError>
Execute a node
Routes the execution to the appropriate service and handles callbacks.
Sourcepub async fn execute_with_capabilities(
&self,
node_id: &str,
context: NodeContext,
required_capabilities: Vec<String>,
) -> Result<NodeExecutionResult, NodeExecutorError>
pub async fn execute_with_capabilities( &self, node_id: &str, context: NodeContext, required_capabilities: Vec<String>, ) -> Result<NodeExecutionResult, NodeExecutorError>
Execute a node with required capabilities
Sourcepub async fn register_connection(
&self,
service_id: ServiceId,
_transport: StdioTransport,
)
pub async fn register_connection( &self, service_id: ServiceId, _transport: StdioTransport, )
Register a transport connection for a service
Sourcepub async fn remove_connection(&self, service_id: &ServiceId)
pub async fn remove_connection(&self, service_id: &ServiceId)
Remove a transport connection
Sourcepub async fn is_connected(&self, service_id: &ServiceId) -> bool
pub async fn is_connected(&self, service_id: &ServiceId) -> bool
Check if a service is connected
Sourcepub async fn handle_callback(
&self,
callback_type: &str,
request_id: &str,
params: Value,
) -> Result<Value, NodeExecutorError>
pub async fn handle_callback( &self, callback_type: &str, request_id: &str, params: Value, ) -> Result<Value, NodeExecutorError>
Handle a callback request from a node
This is called when a node requests AI or tool execution.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for NodeExecutor
impl !RefUnwindSafe for NodeExecutor
impl !UnwindSafe for NodeExecutor
impl Send for NodeExecutor
impl Sync for NodeExecutor
impl Unpin for NodeExecutor
impl UnsafeUnpin for NodeExecutor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more