package octez-libs

  1. Overview
  2. Docs
A package that contains multiple base libraries used by the Octez suite

Install

Dune Dependency

Authors

Maintainers

Sources

octez-19.1.tar.gz
sha256=55ea1fb8bb3273a7fc270ca8f650d45c56449665619482aad9bc12f3ea736b7e
sha512=fec850fc2d17d7490bbabd5147d62aad13b3aaed8774270f8a38ab419670ed03e0fd30cf8642a97984eca5c2446726fe590ad99c015f7ec50919dc7652f25053

doc/octez-libs.rpc-http-server/Tezos_rpc_http_server/RPC_middleware/index.html

Module Tezos_rpc_http_server.RPC_middlewareSource

This module provides middlewares that is used by the RPC servers to forward unsupported RPCs to a full node.

Sourcetype forwarder_events = {
  1. on_forwarding : Cohttp.Request.t -> unit Lwt.t;
    (*

    Called right before an unsupported RPC gets forwarded to the node.

    *)
  2. on_locally_handled : Cohttp.Request.t -> unit Lwt.t;
    (*

    Called after an RPC has been handled by the server itself (without any forwarding).

    *)
}

Callbacks to add side-effects to proxy_server_query_forwarder, typically used to emit events.

Sourceval proxy_server_query_forwarder : ?acl:RPC_server.Acl.t -> ?ctx:Cohttp_lwt_unix.Net.ctx -> ?forwarder_events:forwarder_events -> Uri.t -> RPC_server.callback -> RPC_server.callback

A Resto middleware that transforms any callback to an other that rewrites queries that the proxy server cannot handle and forwards them to the full node at the given Uri.t. If acl parameter is provided, the forwarding happens only if the ACL rules are satisfied.

Sourceval rpc_metrics_transform_callback : update_metrics: (string -> string -> (unit -> Cohttp_lwt_unix.Server.response_action Lwt.t) -> Cohttp_lwt_unix.Server.response_action Lwt.t) -> unit Tezos_rpc.Directory.t -> RPC_server.callback -> RPC_server.callback

A Resto middleware that transforms any server callback to an other that handles RPC metrics

OCaml

Innovation. Community. Security.