package versioned_polling_state_rpc

  1. Overview
  2. Docs
type ('query, 'response) caller = (?initial_query:'query -> unit -> ('query, 'response) Polling_state_rpc.Client.t) Babel.Caller.t

A ('query, 'response) caller represents a nonempty list of creator functions, each representing a single Polling_state_rpc.t.

val create_caller : ('query, 'response) Polling_state_rpc.t -> ('query, 'response) caller

Create a caller from a single Polling_state_rpc.t. Callers can be combined in the typical babel way, e.g. using Babel.Caller.of_list_decreasing_preference.

val negotiate_client : ('query, 'response) caller -> ?initial_query:'query -> Async_rpc_kernel.Versioned_rpc.Connection_with_menu.t -> ('query, 'response) Polling_state_rpc.Client.t Core.Or_error.t

This function will use the menu embedded in Versioned_rpc.Connection_with_menu to choose the most up-to-date Polling_state_rpc.t that both you and the server know and will use that Polling_state_rpc.t under the hood.

OCaml

Innovation. Community. Security.