MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / is_mock_route

Function is_mock_route

crates/openshell-router/src/mock.rs:11–13  ·  view source on GitHub ↗

Returns true if the route's endpoint uses the `mock://` scheme, indicating the router should return a canned response.

(route: &ResolvedRoute)

Source from the content-addressed store, hash-verified

9/// Returns true if the route's endpoint uses the `mock://` scheme,
10/// indicating the router should return a canned response.
11pub fn is_mock_route(route: &ResolvedRoute) -> bool {
12 route.endpoint.starts_with(MOCK_SCHEME)
13}
14
15/// Generate a canned HTTP response appropriate for the route's protocol.
16///

Callers 3

proxy_with_candidatesMethod · 0.85
verify_backend_endpointFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected