package bonsai

  1. Overview
  2. Docs
A library for building dynamic webapps, using Js_of_ocaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.17.0.tar.gz
sha256=c78c4476ee6b856846e2d0941e5965009d5e1b853e564b2b1bee61202f0b1ebb

doc/bonsai.web/Bonsai_web/Rpc_effect/For_introspection/index.html

Module Rpc_effect.For_introspectionSource

Sourceval should_record_effect : bool Effect.t

This module contains functions and effects for "introspecting" rpc effect rpc's.

This is how the Rpc_effect module communicates rpc information to the bonsai chrome extension's devtool panel. This module is meant to be used by bonsai internals and not by bonsai apps directly.

Sourceval run_top_level_side_effects : unit -> unit

register registers the callbacks necessary for introspection to work/sets up the communication necessary for the chrome dev tool panel. It does not actually start do any introspection itself. Introspection is enabled/controlled by the panel via the communication mechanisms setup by register.

Sourceval send_and_track_rpc_from_poller : rpc_kind:Bonsai_introspection_protocol.Rpc_kind.t -> get_current_time:Core.Time_ns.t Effect.t -> sexp_of_query:('query -> Core.Sexp.t) option -> sexp_of_response:('response -> Core.Sexp.t) option -> path:string -> send_rpc: ('query -> 'response Core.Or_error.t Bonsai.Effect_throttling.Poll_result.t Ui_effect.t) -> query:'query -> 'response Core.Or_error.t Bonsai.Effect_throttling.Poll_result.t Ui_effect.t

send_and_track_rpc_from_poller sends the send_rpc rpc, but it also records its start/finish event messages and "enqueue"'s the messages so that they can be read by the devtool panel.

This function is specialized for "polling" functions that return a ('query, 'response) Poll_result.t . For "dispatch" equivalents refer to send_and_track_rpc_from_dispatch.

Sourceval send_and_track_rpc_from_dispatch : rpc_kind:Bonsai_introspection_protocol.Rpc_kind.t -> get_current_time:Core.Time_ns.t Effect.t -> sexp_of_query:('query -> Core.Sexp.t) option -> sexp_of_response:('response -> Core.Sexp.t) option -> path:string -> send_rpc:('query -> 'response Core.Or_error.t Ui_effect.t) -> query:'query -> 'response Core.Or_error.t Ui_effect.t

send_and_track_rpc_from_dispatch is like send_and_track_rpc_from_poller but for one-off dispatch functions. (e.g. Rpc_effect.Rpc.dispatcher).

Sourcemodule For_testing : sig ... end