irmin-pack

Irmin backend which stores values in a pack file
IN THIS PACKAGE

Parameters

module K : Irmin.Hash.S

Signature

type t
type key = K.t
include Index.S with type value := value and type t := t and type key := key
type cache

The type for caches of index instances.

val empty_cache : unit -> cache

Construct a new empty cache of index instances.

val clear : t -> unit

clear t clears t so that there are no more bindings in it.

val replace : ?overcommit:bool -> t -> key -> value -> unit

replace t k v binds k to v in t, replacing any existing binding of k.

If overcommit is true, the operation does not triger a merge, even if the caches are full. By default overcommit is false.

val sync : t -> unit

sync t syncs a read-only index with the files on disk. Raises RW_not_allowed if called by a read-write index.

val is_merging : t -> bool

is_merging t returns true if t is running a merge. Raises RO_not_allowed if called by a read-only index.

module Checks : sig ... end

Offline fsck-like utility for checking the integrity of Index stores built using this module.

val v_exn : ?flush_callback:( unit -> unit ) -> ?fresh:bool -> ?readonly:bool -> ?throttle:[ `Block_writes | `Overcommit_memory ] -> ?lru_size:int -> log_size:int -> string -> t
type error := [
| `Index_failure of string
| `Io_misc of Io.Unix.misc_error
]
val v : ?flush_callback:( unit -> unit ) -> ?fresh:bool -> ?readonly:bool -> ?throttle:[ `Block_writes | `Overcommit_memory ] -> ?lru_size:int -> log_size:int -> string -> ( t, [> error ] ) result
val reload : t -> ( unit, [> error ] ) result
val close : t -> ( unit, [> error ] ) result
val close_exn : t -> unit
val flush : t -> with_fsync:bool -> ( unit, [> error ] ) result
val find : t -> key -> value option
val add : ?overcommit:bool -> t -> key -> value -> unit
val merge : t -> unit
val mem : t -> key -> bool
val iter : ( key -> value -> unit ) -> t -> unit
val filter : t -> ( (key * value) -> bool ) -> unit
val try_merge : t -> unit
module Stats = Index.Stats
module Key : Index.Key.S with type t = key