package irmin-containers

  1. Overview
  2. Docs

Make returns a mergeable counter using the backend and other parameters as specified by the user.

Parameters

module Backend : sig ... end

Signature

module Store : Irmin.S with type branch = string with type key = string list with type step = string

Content store of counter. All store related operations like branching, cloning, merging, etc are done through this module.

val inc : ?by:int64 -> ?info:Irmin.Info.f -> path:Store.key -> Store.t -> unit Lwt.t

Increment the counter by the amount specified using by. If no value is specified, then by is assigned the value 1L.

val dec : ?by:int64 -> ?info:Irmin.Info.f -> path:Store.key -> Store.t -> unit Lwt.t

Decrement the counter by the amount specified using by. If no value is specified, then by is assigned the value 1L.

val read : path:Store.key -> Store.t -> int64 Lwt.t

Read the value of the counter

OCaml

Innovation. Community. Security.