package bonsai

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Rpc_effect.PrivateSource

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.

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.

Sourceval self_connector : unit -> Connector.t

The connector for the server hosting the web page.

Sourceval url_connector : string -> Connector.t

The connector for an arbitrary URL.

Sourceval 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.

Sourcemodule For_tests : sig ... end
OCaml

Innovation. Community. Security.