package irmin

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

LINK_MAKER is the signature exposed by store which enable adding relation between keys. This is used to decouple the way keys are manipulated by the Irmin runtime and the keys used for storage. This is useful when trying to optimize storage for random-access file operations or for encryption.

Parameters

module K : Hash.S

Signature

include LINK with type key = K.t and type value = K.t

The link store contains verified links between low-level keys. This is used to certify that a value can be accessed via different keys: because they have been obtained using different hash functions (SHA1 and SHA256 for instance) or because the value might have different but equivalent concrete representation (for instance a set might be represented as various equivalent trees).

include RO with type key = K.t with type value = K.t

Read-only stores

type t

Type for stores.

type key = K.t

Type for keys.

type value = K.t

Type for values.

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

Read a value from the store.

val read_exn : t -> key -> value Lwt.t

Same as read but raise Invalid_argument if the key does not exist.

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

Check if a key exists.

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

iter t fn call the function fn on all t's keys and values.

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

add t src dst add a link between the key src and the value dst.

val create : config -> t Lwt.t
OCaml

Innovation. Community. Security.