package command_rpc

  1. Overview
  2. Docs
type t
type 'a with_connection_args = ?heartbeat_config:Async.Rpc.Connection.Heartbeat_config.t -> ?max_message_size:int -> ?propagate_stderr:bool -> ?env:Async.Process.env -> ?process_create: (prog:string -> args:string list -> ?env:Async.Process.env -> ?working_dir:string -> unit -> Async.Process.t Async.Deferred.Or_error.t) -> ?working_dir:string -> prog:string -> args:string list -> 'a

create spawns a child process and returns an RPC connection that operates on the child's stdin and stdout. The child will be killed and reaped when the connection is closed. If propagate_stderr is true, the child's stderr will be printed on the parent's stderr; otherwise it will be ignored.

with_close spawns a child and connects like create, calls the function passed in on the resulting connection, and then closes the connection and kills the child.

val rpc_connection : t -> Async.Rpc.Connection.t

Get the RPC connection needed to talk to the command-rpc executable.

module Expert : sig ... end

This module exists for testing purposes only. For example, clients can test whether their command-rpc server cleans up after itself properly when a ctrl-c at the command line kills a whole process group, server included.

OCaml

Innovation. Community. Security.