Irmin_containersIrmin_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:
Irmin_memIrmin_fs_unix.module Counter : sig ... endThe implementation of an int64 counter. This module supports operations to increment, decrement and read the value of the counter.
module Lww_register : sig ... endThe 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 ... endThe 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 ... endThe 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.
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 Content_addressable = sig ... endCas_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 ... endTime specifies a source of timestamps. Timestamps must be monotonic for the data structures to function properly.