MCPcopy Create free account
hub / github.com/AI45Lab/Code / set_lane_handler

Method set_lane_handler

sdk/node/src/lib.rs:3967–3984  ·  view source on GitHub ↗
(
        &self,
        lane: String,
        config: LaneHandlerConfig,
    )

Source from the content-addressed store, hash-verified

3965 /// @param config - { mode: "internal"|"external"|"hybrid", timeoutMs?: number }
3966 #[napi]
3967 pub async fn set_lane_handler(
3968 &self,
3969 lane: String,
3970 config: LaneHandlerConfig,
3971 ) -> napi::Result<()> {
3972 let rust_lane = parse_lane(&lane)?;
3973 let rust_mode = parse_handler_mode(&config.mode)?;
3974 let rust_config = RustLaneHandlerConfig {
3975 mode: rust_mode,
3976 timeout_ms: config.timeout_ms.unwrap_or(60000) as u64,
3977 };
3978 let session = self.inner.clone();
3979 get_runtime()
3980 .spawn(async move { session.set_lane_handler(rust_lane, rust_config).await })
3981 .await
3982 .map_err(|e| napi::Error::from_reason(format!("Task join error: {e}")))?;
3983 Ok(())
3984 }
3985
3986 /// Complete an external queue task by ID.
3987 ///

Callers

nothing calls this directly

Calls 5

parse_laneFunction · 0.70
parse_handler_modeFunction · 0.70
get_runtimeFunction · 0.70
cloneMethod · 0.45
spawnMethod · 0.45

Tested by

no test coverage detected