Module Async_rpc_kernel__Rpc.State_rpc

A state rpc is an easy way for two processes to synchronize a data structure by sending updates over the wire. It's basically a pipe rpc that sends/receives an initial state of the data structure, and then updates, and applies the updates under the covers.

type ('query, 'state, 'update, 'error) t
module Id : sig ... end
module Metadata : sig ... end
val create : ?client_pushes_back:unit ‑> name:string ‑> version:int ‑> bin_query:'query Bin_prot.Type_class.t ‑> bin_state:'state Bin_prot.Type_class.t ‑> bin_update:'update Bin_prot.Type_class.t ‑> bin_error:'error Bin_prot.Type_class.t ‑> unit ‑> ('query'state'update'errort
val bin_query : ('query___t ‑> 'query Bin_prot.Type_class.t
val bin_state : (_'state__t ‑> 'state Bin_prot.Type_class.t
val bin_update : (__'update_t ‑> 'update Bin_prot.Type_class.t
val bin_error : (___'errort ‑> 'error Bin_prot.Type_class.t
val implement : ('query'state'update'errort ‑> ('connection_state ‑> 'query ‑> ('state * 'update Async_kernel.Pipe.Reader.t'errorCore_kernel.Result.t Async_kernel.Deferred.t) ‑> 'connection_state Implementation.t
val dispatch : ('query'state'update'errort ‑> Connection.t ‑> 'query ‑> ('state * 'update Async_kernel.Pipe.Reader.t * Metadata.t'errorCore_kernel.Result.t Core_kernel.Or_error.t Async_kernel.Deferred.t
val abort : (____t ‑> Connection.t ‑> Id.t ‑> unit
val close_reason : Metadata.t ‑> Pipe_close_reason.t Async_kernel.Deferred.t
val name : (____t ‑> string
val version : (____t ‑> int
val description : (____t ‑> Description.t