MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / dispatch_local

Function dispatch_local

nodedb/src/control/gateway/dispatcher.rs:87–96  ·  view source on GitHub ↗

Local dispatch via SPSC bridge.

(
    route: TaskRoute,
    shared: &Arc<SharedState>,
    tenant_id: TenantId,
    trace_id: TraceId,
)

Source from the content-addressed store, hash-verified

85
86/// Local dispatch via SPSC bridge.
87async fn dispatch_local(
88 route: TaskRoute,
89 shared: &Arc<SharedState>,
90 tenant_id: TenantId,
91 trace_id: TraceId,
92) -> Result<Vec<Vec<u8>>, Error> {
93 let vshard_id = VShardId::new(route.vshard_id);
94 let resp = dispatch_to_data_plane(shared, tenant_id, vshard_id, route.plan, trace_id).await?;
95 Ok(vec![resp.payload.to_vec()])
96}
97
98/// Arguments for a remote dispatch call (bundles the 8 parameters to stay
99/// within clippy's `too_many_arguments` limit).

Callers 1

dispatch_routeFunction · 0.70

Calls 1

dispatch_to_data_planeFunction · 0.50

Tested by

no test coverage detected