package rpclib

  1. Overview
  2. Docs
A library to deal with RPCs in OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

rpclib-10.0.0.tbz
sha256=1d62cf36ff3f599286ff6c77a3266b04d9e14df73d3fce078d51ab9c4c7bad3a
sha512=9fe0bc38363c35e5ec185eadc096565f7f76e219bfde62756dee2cbc818e7663e1ce2e730a235f2bf2230a24ff52b29bcc8e1082e0a43d7e6c23f56ad74add43

doc/rpclib.core/Rpc/index.html

Module RpcSource

Value

Sourcetype t =
  1. | Int of int64
  2. | Int32 of int32
  3. | Bool of bool
  4. | Float of float
  5. | String of string
  6. | DateTime of string
  7. | Enum of t list
  8. | Dict of (string * t) list
  9. | Base64 of string
  10. | Null
Sourceval to_string : t -> string
Sourcemodule Version : sig ... end
Sourcemodule Types : sig ... end

Basic constructors

Sourceval rpc_of_int64 : int64 -> t
Sourceval rpc_of_int32 : int32 -> t
Sourceval rpc_of_int : int -> t
Sourceval rpc_of_bool : bool -> t
Sourceval rpc_of_float : float -> t
Sourceval rpc_of_string : string -> t
Sourceval rpc_of_dateTime : string -> t
Sourceval rpc_of_base64 : string -> t
Sourceval rpc_of_t : t -> t
Sourceval rpc_of_unit : unit -> t
Sourceval rpc_of_char : char -> t
Sourceval int64_of_rpc : t -> int64
Sourceval int32_of_rpc : t -> int32
Sourceval int_of_rpc : t -> int
Sourceval bool_of_rpc : t -> bool
Sourceval float_of_rpc : t -> float
Sourceval string_of_rpc : t -> string
Sourceval dateTime_of_rpc : t -> string
Sourceval base64_of_rpc : t -> string
Sourceval t_of_rpc : t -> t
Sourceval char_of_rpc : t -> char
Sourceval unit_of_rpc : t -> unit
Sourcemodule ResultUnmarshallers : sig ... end

Calls

Sourcetype callback = string list -> t -> unit
Sourcetype call = {
  1. name : string;
  2. params : t list;
  3. is_notification : bool;
}
Sourceval call : string -> t list -> call
Sourceval notification : string -> t list -> call
Sourceval string_of_call : call -> string

Responses

Sourcetype response = {
  1. success : bool;
  2. contents : t;
  3. is_notification : bool;
}
Sourceval string_of_response : response -> string
Sourceval success : t -> response
Sourceval failure : t -> response

Run-time errors

Sourceexception Runtime_error of string * t
Sourceexception Runtime_exception of string * string
Sourceval set_debug : bool -> unit

Debug options

Sourceval get_debug : unit -> bool
Sourceval lowerfn : t -> t

Helper

Sourceval struct_extend : t -> t -> t

struct_extend rpc1 rpc2 first checks that rpc1 and rpc2 are both * dictionaries. If this is the case then struct_extend will create a new * Rpc.t which contains all key-value pairs from rpc1, as well as all * key-value pairs from rpc2 for which the key does not exist in rpc1.