Module Tezos_proxy.Proxy_services

exception Rpc_dir_creation_failure of Tezos_base.TzPervasives.tztrace

Exception used by the proxy mode when creation of the input environment (of the RPC handler) fails. This exception is used to temporarily escape from the monad, because at the point of throwing, the code is NOT in tzresult Lwt.t. As it's dealing with resto APIs it's in an Lwt.t-only monad. This exception is injected back in the tzresult Lwt.t monad at the point where it is caught (with Lwt.catch).

type mode =
  1. | Light_client of Light.sources
    (*

    octez-client --mode light is running

    *)
  2. | Proxy_client
    (*

    octez-client --mode proxy is running

    *)

Whether using the light mode or the proxy mode (remember that the light mode is a different instance of the proxy mode (see srcs/lib_proxy/README_LIGHT.md for documentation) and whether octez-client is running.

build_directory printer rpc_context env mode returns the directory of RPCs that is served locally by the client's light and proxy modes. Parameters are:

  • printer is used for logging.
  • rpc_context is used to perform RPCs to distant endpoints.
  • mode specifies whether octez-client (light or proxy mode) is running.
  • env is a protocol-specific module used to create the context passed when executing a RPC.