Module type Ezirmin.Blob_log

module type Blob_log = sig .. end


An append-only log



Blob_log provides mergeable append-only logs. Appending to log is a O(n) operation, where n is the size of the size of the log. For an efficient implementation see, Ezirmin.Log.
include Ezirmin.Repo
type elt 
The type of value stored in the log.
val append : ?message:string ->
branch -> path:string list -> elt -> unit Lwt.t
append m b p e appends a log message e to the log at path p in branch b with commit message m.
val read_all : branch -> path:string list -> elt list Lwt.t
read_all b p returns the list of messages in the log at path b in branch b.
val watch : branch ->
path:string list ->
(elt -> unit Lwt.t) -> (unit -> unit Lwt.t) Lwt.t
watch b p cb watches the log at the path p in the branch b. On each append of a message m to the log, the callback function cb m is invoked. Before installing watches, a listener thread must be started with Ezirmin.Repo.install_listener that watches the store for changes.
Returns a function to disable the watch.