This module allows the jenga server to incrementally send updates about build errors in a typed way to clients (see the errors rpc).
type tA Reportable.t is an updatable bag of reportable errors, with clients.
When a client attaches it receives a snapshot and a pipe of updates.
include sig ... endval sexp_of_t : t ‑> Base.Sexp.tval create : name:string ‑> tcreate t returns a new Reportable.t to which errors can be added and removed
name is shown by "jenga -trace" when clients register/unregister
module Snap : sig ... endmodule Update : sig ... endmodule Stable : sig ... endval drop_clients : t ‑> unitDrop all clients attached to the Reportable.t. Useful for testing the reconnection
logic of clients.
val snap_with_updates : trace:(string ‑> unit) ‑> t ‑> Snap.t * Update.t Async.Pipe.Reader.tsnap_with_updates ~trace t attaches a new client, returning the snapshot & update
pipe. The client is detached when the caller closes the returned pipe-reader.
The intended use of snap_with_updates is the Error_pipe RPC; constructing a
`mirror' Reportable.t on the client-side of the RPC using of_snap and update.