Module Irmin_containers

Irmin_containers is a collection of simple, ready-to-use mergeable data structures. Each data structure works with an arbitrary Irmin backend and is customisable in a variety of ways.

Additionally, Irmin_containers supplies instantiations of each of these data structures with two backends:

Data structures

module Counter : sig ... end

The implementation of an int64 counter. This module supports operations to increment, decrement and read the value of the counter.

module Lww_register : sig ... end

The implementation of last-write-wins register. The value to be stored in the register and the timestamp method are provided by the user.

module Blob_log : sig ... end

The implementation of log in which it is maintained as a single unit, or blob. Hence, two versions of the log cannot share their common predecessor. The type of values to be stored as well as a method to obtain timestamps are provided by the user.

module Linked_log : sig ... end

The linked list implementation of log. Due to the linked property, two versions of the log share their common predecessor. As it is a linked data structure, a content addressable store is required. Along with that, a method to obtain timestamps, a hash for the content addressable store and the type of values stored must also be provided.

Auxiliary signatures and modules

module type Store_maker = sig ... end

Store_maker is the signature for the backend input to the data structures. The Irmin stores of the data structures are constructed using modules of this type

module type Cas_maker = sig ... end

Cas_maker is the signature for the store which will be used to maintain linked data structures. The elements are hashed into this store and the hash value is used to construct the linkages.

module Time : sig ... end

Time specifies a source of timestamps. Timestamps must be monotonic for the data structures to function properly.