package irmin-pack

  1. Overview
  2. Docs
Irmin backend which stores values in a pack file

Install

Dune Dependency

Authors

Maintainers

Sources

irmin-3.1.0.tbz
sha256=d84fa343a841f663969ed6b08e5fc1b704d3ab7974858aa29471fe291a6a2f86
sha512=ab5eb4bd08ab69b97c8b9a72181c5b59d3d515e4ba63550d8a4551ec8ea72cd2d3b302fe0812379553e52891f81a9ae5d4d668382155d9c6c6eb75844a48477e

doc/irmin-pack.unix/Irmin_pack_unix/Checks/Index/argument-1-Index/index.html

Parameter Index.Index

include Index.S with type value = Optint.Int63.t * int * Irmin_pack.Pack_value.Kind.t
type t

The type for indexes.

type key

The type for keys.

The type for values.

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 mem : t -> key -> bool

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

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 filter : t -> ((key * value) -> bool) -> unit

filter t p removes all the bindings (k, v) that do not satisfy p. This operation is costly and blocking.

val iter : (key -> value -> unit) -> t -> unit

Iterates over the index bindings. Limitations:

  • Order is not specified.
  • In case of recent replacements of existing values (since the last merge), this will hit both the new and old bindings.
  • May not observe recent concurrent updates to the index by other processes.
val flush : ?no_callback:unit -> ?with_fsync:bool -> t -> unit

Flushes all internal buffers of the IO instances.

  • Passing ~no_callback:() disables calling the flush_callback passed to v.
  • If with_fsync is true, this also flushes the OS caches for each IO instance.
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.

val try_merge : t -> unit

try_merge is like merge but is a no-op if the number of entries in the write-ahead log is smaller than log_size.

module Checks : sig ... end

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

val v : ?flush_callback:(unit -> unit) -> ?fresh:bool -> ?readonly:bool -> ?throttle:[ `Block_writes | `Overcommit_memory ] -> ?lru_size:int -> log_size:int -> string -> t

Constructor for indices, memoized by (path, readonly) pairs.

val find : t -> key -> value option
val add : ?overcommit:bool -> t -> key -> value -> unit
val close : t -> unit
val merge : t -> unit
module Stats = Index.Stats
OCaml

Innovation. Community. Security.