package async_rpc_kernel

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module One_way.MakeSource

Given a model of the types involved in a family of RPCs, this functor provides a single multi-version implementation function implement_multi in terms of that model and a mechanism for registering the individual versions that implement_multi knows about. Registration requires knowing how to get into the model.

  M1 -->-.
          \
  M2 -->-- M
          /
  M3 -->-´

Parameters

module Model : sig ... end

Signature

Sourcemodule Register (Version_i : sig ... end) : sig ... end

Add a new version to the set of versions implemented by implement_multi.

include S with type msg := Model.msg
Sourceval implement_multi : ?log_not_previously_seen_version:(name:string -> int -> unit) -> ('state -> version:int -> Model.msg -> unit) -> 'state Rpc.Implementation.t list

implement multiple versions at once

Sourceval rpcs : unit -> Rpc.Any.t list

All rpcs implemented by implement_multi

Sourceval versions : unit -> Core.Int.Set.t

All versions implemented by implement_multi. (useful for computing which old versions may be pruned)

Sourceval name : string