package babel

  1. Overview
  2. Docs

High level functions for working with callers in the style of Async.Rpc.One_way.dispatch.

type 'msg dispatch := 'msg -> unit Core.Or_error.t

Determine which supported dispatch strategy to use and invoke the chosen rpcs.

val singleton : 'msg Async_rpc_kernel.Rpc.One_way.t -> 'msg dispatch t

Create a new caller supporting a single rpc.

val add : 'msg dispatch t -> rpc:'msg Async_rpc_kernel.Rpc.One_way.t -> 'msg dispatch t

Add support for dispatching another rpc. dispatch_multi will prefer this rpc over the ones the caller already supports.

val map_query : 'msg1 dispatch t -> f:('msg2 -> 'msg1) -> 'msg2 dispatch t

A specialization of map for the query type of a protocol.

OCaml

Innovation. Community. Security.