package octez-rpc-process

  1. Overview
  2. Docs

Worker that handles the RPC server spawned as an external process by the node.

This module defines an RPC process worker type t that is responsible of dealing with the process' lifetime.

type t

Type of the RPC process worker

create ~comm_socket_path config node_version internal_event_config creates the worker initial state. comm_socket_path is a socket path that will be used to communicate with the node (note that the socket is created automatically, but the cleaning of it is not handled). config contains all the RPC server configuration (such as ACLs, cors_headers, …). node_version contains informations regarding version of the node to show when answering related rpcs.

Starts the external RPC process using fork+exec calls. It implements a watch dog that is responsible of restarting the process if it dies at some point. Additionally, if the process fails to be restarted, it retries with an exponential back-off until the restart is successful. The promise is blocking until the RPC server is not fully available to answer to PCs.

val stop : t -> unit Lwt.t

Stops gracefully the RPC process worker

OCaml

Innovation. Community. Security.