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 idempotent string, JSON and C-buffers like values are provided.

module type S0 = sig ... end

Base Contents

module type Conv = sig ... end

Conv is the signature for contents which can be converted back and forth from the command-line.

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

String values where only the last modified value is kept on merge. If the value has been modified concurrently, the merge function conflicts. Assume that update operations are idempotent.

module Cstruct : S with type t = Cstruct.t

Cstruct values where only the last modified value is kept on merge. If the value has been modified concurrently, the merge function conflicts. Assume that update operations are idempotent.

module type STORE = sig ... end

Contents store.

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

Store creates a contents store.