Module Ezirmin.FS_counter

module FS_counter: Counter 
A counter that uses git filesystem backend.


Mergeable counters


include Ezirmin.Repo
val inc : ?message:string -> ?by:int -> branch -> path:string list -> unit Lwt.t
inc m d b p increments the counter at path p in branch b by d. The commit message is m.
val dec : ?message:string -> ?by:int -> branch -> path:string list -> unit Lwt.t
dec m d b p decrements the counter at path p in branch b by d. The commit message is m.
val read : branch -> path:string list -> int Lwt.t
read b p reads the value of the counter at path p in branch b.
val watch : branch ->
path:string list -> (int -> unit Lwt.t) -> (unit -> unit Lwt.t) Lwt.t
watch b p cb watches the counter at the path p in the branch b. On each counter update, the callback function cb v is invoked, where v is the new value of the counter. 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.