package octez-libs
- Overview
- No Docs
You can search for identifiers within the package.
in-package search v0.2.0
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=c6df840ebbf115e454db949028c595bec558a59a66cade73b52a6d099d6fa4d4
sha512=d8aee903b9fe130d73176bc8ec38b78c9ff65317da3cb4f3415f09af0c625b4384e7498201fdb61aa39086a7d5d409d0ab3423f9bc3ab989a680cf444a79bc13
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.
type forwarder_events = {on_forwarding : Cohttp.Request.t -> unit Lwt.t;(*Called right before an unsupported RPC gets forwarded to the node.
*)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.
val 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.callbackA 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.
val 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.callbackA Resto middleware that transforms any server callback to an other that handles RPC metrics