type error = [
`Msg of string
`Dictionary_expected of Mirage_kv.Key.t
`Not_found of Mirage_kv.Key.t
`Value_expected of Mirage_kv.Key.t
include Mirage_kv.RO with type error := error
Read-only key-value stores
Disconnect from the key-value store. While this might take some time to complete, it can never result in an error.
type key = Mirage_kv.Key.t
The type for keys.
exists t k is
Some `Value if
k is bound to a value in
Some `Dictionary if
k is a prefix of a valid key in
None if no key with that prefix exists in
exists answers two questions: does the key exist and is it referring to a value or a dictionary.
An error occurs when the underlying storage layer fails.
get t k is the value bound to
The result is
Error (`Value_expected k) if
k refers to a dictionary in
list t k is the list of entries and their types in the dictionary referenced by
The result is
Error (`Dictionary_expected k) if
k refers to a value in
last_modified t k is the last time the value bound to
t has been modified.
The modification time
(d, ps) is a span for the signed POSIX picosecond span
d * 86_400e12 +
d is a signed number of POSIX days and
ps a number of picoseconds in the range [
When the value bound to
k is a dictionary, the modification time is the latest modification of all entries in that dictionary. This behaviour is only one level deep and not recursive.