Module Command_rpc.Command

Command is used for setting up an RPC server in the child process. By default this will set up an RPC server, but passing the -sexp flag will make it run the implementation on a sexp read from stdin instead. Passing the -menu flag will cause the command to print out a sexp indicating which RPC names and versions are supported.

module Invocation : sig ... end
module Stateful : sig ... end
module type T = Stateful.T with type state := Invocation.t
module type T_conv = Stateful.T_conv with type state := Invocation.t
module type T_pipe = Stateful.T_pipe with type state := Invocation.t
module type T_pipe_conv = Stateful.T_pipe_conv with type state := Invocation.t
module type T_state_bin_io_only = Stateful.T_state_bin_io_only with type state := Invocation.t
module type T_state_conv_bin_io_only = Stateful.T_state_conv_bin_io_only with type state := Invocation.t
module type T_pipe_direct_bin_io_only = Stateful.T_pipe_direct_bin_io_only with type state := Invocation.t
type t = [
| `Plain of (module T)
| `Plain_conv of (module T_conv)
| `Pipe of (module T_pipe)
| `Pipe_conv of (module T_pipe_conv)
| `Pipe_direct_bin_io_only of (module T_pipe_direct_bin_io_only)
| `State_bin_io_only of (module T_state_bin_io_only)
| `State_conv_bin_io_only of (module T_state_conv_bin_io_only)
]
val stateful : Invocation.t Stateful.t list -> t list

You need to call this on your list of stateful RPCs before they can be passed to create or (more usually) the function you get in Expert.param.

val create : ?⁠heartbeat_config:Async.Rpc.Connection.Heartbeat_config.t -> ?⁠max_message_size:int -> ?⁠log_not_previously_seen_version:(name:string -> int -> unit) -> summary:string -> t list -> Async.Command.t
module Expert : sig ... end