Dal_node.ProxyThe Proxy module provides functionality to create a proxy server that can intercept and mock responses for DAL node requests.
Represents a possible response from a proxy route.
val route :
path:Re.Str.regexp ->
callback:
(path:string ->
fetch_answer:(unit -> Ezjsonm.t Lwt.t) ->
fetch_stream:(unit -> (Cohttp.Response.t * Cohttp_lwt.Body.t) Lwt.t) ->
answer option Lwt.t) ->
routeCreates a route for the proxy, containing a path pattern and a callback. The callback is provided with the path actually matched together with a fetch_answer callback to retrieve the DAL node answer for the given path. The path could be used when one wants to retreive path arguments. The fetch_answer callback could be used when one only want to modify a field in the honest response.
val make :
name:string ->
attestation_lag:int ->
number_of_slots:int ->
faulty_delegate:string ->
target_attested_level:int ->
proxyCreates a new proxy instance.
val stop : proxy -> unitStops the proxy server.