module type Lww_register =
Lww_register provides registers that can be read and written to. In
case of conflicting writes, the latest write wins.
The type of content stored in the register.
val read :
branch -> path:string list -> value option Lwt.t
read b p fetches the value of the register at path
b in the branch
b. If the register had not been previously written to, then the
val write :
branch -> path:string list -> value -> unit Lwt.t
write b p m v updates the value of the register at path
b in branch
v with commit message
val watch :
path:string list ->
([ `Added of value
| `Removed of value
| `Updated of value * value ] ->
unit Lwt.t) ->
(unit -> unit Lwt.t) Lwt.t
watch b p cb watches the register at path
p in the branch
cb is the callback function.
Returns a function to disable the watch.