Module Rpc_effect_kernel.Private

This module contains functions intended for use by Bonsai's internal startup code. Ordinarily, you shouldn't need to call any of them.

More specifically, in tests, with_connector is called when a test handle is created, using an optional, user-provided function to select the connector. Similarly, when an app is actually being run, we take a function of type Custom.t -> Connector.t and default the Self and Url cases to self_connector and url_connector declared below.

val with_connector : (Where_to_connect.t -> Connector.t) -> (Bonsai.graph @ local -> 'a Bonsai.t) -> Bonsai.graph @ local -> 'a Bonsai.t

Turns a computation into a new computation that has access to some sort of connection. This is the primitive and most powerful way of providing access to a connection. Since it has access to the Where_to_connect.t, it can create different kinds of connections based on what is being connected to.

val set_introspection : (module Rpc_effect_kernel__.Introspection_intf.S) -> unit

set_introspection will let you register an introspection module. This module provides / forwards the information necessary for the bonsai devtool panel to work. Because there are cases where we do not have a devtool panel (e.g. bonsai_term apps), rpc_effect_kernel defaults to not doing introspection. You can call this function to implement introspection support.

val is_test_fallback : Connector.t -> bool

Determines whether the connector is the test fallback connector. This is used by the testing library to swap out the test_fallback connector with a different connector controlled by other parameters.

module For_tests : sig ... end