Parameter Atomic_write.M

Parameters

module Key : Type.S
module Value : Type.S

Signature

type t
type key = Key.t
type value = Value.t
val v : Irmin__.Conf.t -> t Lwt.t

v config initialises a storage layer, with the configuration config.

val mem : t -> key -> bool Lwt.t

mem t k is true iff k is present in t.

val find : t -> key -> value option Lwt.t

find t k is Some v if k is associated to v in t and None is k is not present in t.

val keys : t -> key list Lwt.t

keys t it the list of keys in t.

val set : t -> key -> value -> unit Lwt.t

set t k v sets the contents of k to v in t.

val remove : t -> key -> unit Lwt.t

remove t k removes the key k in t.

val batch : t -> (t -> 'a Lwt.t) -> 'a Lwt.t

batch t f applies the operations in f in a batch. The exact guarantees depend on the implementation.

val clear : t -> unit Lwt.t

clear t clears the storage. This operation is expected to be slow.

val close : t -> unit Lwt.t

close t frees up all the resources associated with t.