Module One_way.Make
Given a model of the types involved in a family of RPCs, this functor provides a single RPC versioned dispatch function dispatch_multi
in terms of that model and a mechanism for registering the individual versions that dispatch_multi
knows about. Registration requires knowing how to get out of the model.
,-->-- M1 / M --->-- M2 \ `-->-- M3
Parameters
Model : sig ... end
Signature
module Register : functor (Version_i : sig ... end) -> sig ... end
add a new version to the set of versions available via
dispatch_multi
.
include S with type msg := Model.msg
val dispatch_multi : Connection_with_menu.t -> msg -> unit Core_kernel.Or_error.t
multi-version dispatch
val rpcs : unit -> Rpc.Any.t list
All rpcs supported by
dispatch_multi
val versions : unit -> Core_kernel.Int.Set.t
All versions supported by
dispatch_multi
. (useful for computing which old versions may be pruned)