package irmin

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

Contents specifies how user-defined contents need to be serializable and mergeable.

The user need to provide:

  • a pair of to_json and of_json functions, to be used by the REST interface.
  • a triple of size_of, write and read functions, to serialize data on disk or to send it over the network.
  • a 3-way merge function, to handle conflicts between multiple versions of the same contents.

Default contents for string, JSON and C-buffers like values are provided.

module type S = sig ... end
module String : S with type t = string and module Path = Path.String_list

String values where only the last modified value is kept on merge. If the value has been modified concurrently, the merge function raises Conflict.

module Json : S with type t = Ezjsonm.t and module Path = Path.String_list

JSON values where only the last modified value is kept on merge. If the value has been modified concurrently, the merge function raises Conflict.

module Cstruct : S with type t = Cstruct.t and module Path = Path.String_list

Cstruct values where only the last modified value is kept on merge. If the value has been modified concurrently, the merge function raises Conflict.

module type STORE = sig ... end

Contents store.

module Make (S : sig ... end) : STORE with type t = S.t and type key = S.key and type value = S.value and module Path = S.Val.Path

Make builds a contents store.

OCaml

Innovation. Community. Security.