package rpclib

  1. Overview
  2. Docs

The Idl module is for declaring the types and documentation for RPC calls

module Param : sig ... end

The Param module is associated with parameters to RPCs. RPCs are defined in terms of 'a Param.t values.

module Error : sig ... end
module Interface : sig ... end

An interface is a collection of RPC declarations.

exception MarshalError of string

Raised when the client/server failed to unmarshal the RPC response/request.

val get_wire_name : Interface.description option -> string -> string
val get_arg : Rpc.call -> bool -> string option -> bool -> (Rpc.t * Rpc.call, [> `Msg of string ]) result
module type RPC = sig ... end

The RPC module type is the standard module signature that the various specialization modules must conform to.

type rpcfn = Rpc.call -> Rpc.response
module GenClient () : sig ... end

This module generates Client modules from RPC declarations.

module GenClientExn () : sig ... end

This module generates exception-raising Client modules from RPC declarations. See the GenClient module for a description of the common entries.

module type RPCfunc = sig ... end
module GenClientExnRpc (R : RPCfunc) : sig ... end

This module is like GenClientExn, but it allows the user to specify the rpc function once when generating the client.

exception NoDescription

For the Server generation, the 'implement' function call _must_ be called before any RPCs are described. This exception will be raised if the user tries to do this.

type server_implementation
module GenServer () : sig ... end

This module generates a server that dispatches RPC calls to their implementations.

module GenServerExn () : sig ... end

Generates a server, like GenServer, but for an implementation that raises exceptions instead of returning a result.

module DefaultError : sig ... end
OCaml

Innovation. Community. Security.