def route
import bendonnect-rpc@0.1.0.0/src/transport/rpc.bend as Rpcimport Base
import bendonnect-rpc@0.1.0.0/src/transport/server.bend as Srv
51# if call.procedure == procedure then hit(call) else miss(call); chain these, ending in no_route.
52def route(~hit: Srv.Call -> IO(Srv.Reply), ~miss: Srv.Call -> IO(Srv.Reply), +procedure: String, call: Srv.Call) -> IO(Srv.Reply):
53 Srv.Call{+p, kind, codec, headers, timeout_ms, messages} = call
54 route.pick(~hit, ~miss, String.eq(p, procedure), Srv.Call{p, kind, codec, headers, timeout_ms, messages})
Uses (6)
Used by (0)
No other definition uses this definition.