Platform-independent core of Async RPC library


module Model : sig ... end


module type Version_shared = sig ... end
module Register (Version_i : sig ... end) : sig ... end

Adds a new version to the set of versions available via dispatch_multi.

module Register_raw (Version_i : sig ... end) : sig ... end

Register_raw is like Register except you get to deal with the whole pipe. This is useful if, e.g., your model_of_update function can fail, so that you'd like to filter items out from the result pipe.

include S with type query := Model.query with type state := Model.state with type update := Model.update with type error := Model.error

Multi-version dispatch

The return type varies slightly from Rpc.State_rpc.dispatch to make it clear that conversion of each individual element in the returned pipe may fail.

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).

val name : string