package command_rpc

  1. Overview
  2. Docs
module Stderr_handling : sig ... end
type t
type 'a with_connection_args = ?new_fds_for_rpc:bool -> ?stderr_handling:Stderr_handling.t -> ?wait_for_stderr_transfer:bool -> ?connection_description:Core.Info.t -> ?handshake_timeout:Core.Time_float.Span.t -> ?heartbeat_config:Async.Rpc.Connection.Heartbeat_config.t -> ?max_message_size:int -> ?implementations:unit Async.Rpc.Implementations.t -> ?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, then calls the function passed in on the resulting connection. Like Rpc.Connection.with_close, if implementations is passed, with_close will not return until the connection is closed by either the parent or the child; otherwise, it closes the connection and kills the child when the provided function returns.

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 contains some functions that let you interact with the underlying child process. There's nothing particularly tricky about them, but most users don't need them.

OCaml

Innovation. Community. Security.