Module Async_rpc_kernel__Versioned_rpc.Menu

Over-the-network discovery of rpc names and versions supported by a callee.

This is used by the dispatch_multi functions in Caller_converts and Both_convert to dynamically determine the most appropriate version to use.

type t

A directory of supported rpc names and versions.

val add : 's Async_rpc_kernel.Rpc.Implementation.t list ‑> 's Async_rpc_kernel.Rpc.Implementation.t list

add impls extends a list of rpc implementations with an additional rpc implementation for providing a Menu.t when one is requested via Menu.request.

val implement_multi : ?⁠log_not_previously_seen_version:(name:string ‑> int ‑> unit) ‑> ('s ‑> version:int ‑> unit ‑> Async_rpc_kernel.Rpc.Description.t list Async_kernel.Deferred.t) ‑> 's Async_rpc_kernel.Rpc.Implementation.t list

Specifies directly how to handle the version menu rpc.

val request : Async_rpc_kernel.Rpc.Connection.t ‑> t Core_kernel.Or_error.t Async_kernel.Deferred.t

Requests an rpc version menu from an rpc connection.

val supported_rpcs : t ‑> Async_rpc_kernel.Rpc.Description.t list

Finds what rpcs are supported.

val supported_versions : t ‑> rpc_name:string ‑> Core_kernel.Int.Set.t

Finds what versions of a particular rpc are supported.

val create : Async_rpc_kernel.Rpc.Description.t list ‑> t

Creates a menu directly -- generally you should use request instead.

val rpc_name : string

The internal name of this RPC -- for example to be used in Rpc.Expert to distinguish it from other queries.