Log_file.Makemodule Value : Data.Valuetype key := Key.ttype value := Value.tcreate io constructs a write-ahead log from an IO handle referencing an unordered sequence of (binary encoded) key * value bindings. The bindings are read into memory, and any subsequent replace operations are reflected on disk.
val close : t -> unitval cardinal : t -> intto_sorted_seq t is the sequence of all entries in t, sorted by Entry.compare. Modifying t while consuming the sequence results in undefined behaviour.
io t is t's underlying IO handle. Any updates to the file will not be reflected in the in-memory mirror of its state.
val sync_entries : min:Import.int63 -> t -> unitsync_entries ~min t loads the entries from log's IO into memory, starting from offset min.
val flush : ?no_callback:unit -> with_fsync:bool -> t -> unitflush t is IO.flush (io t).
val reload : t -> unitreload t clears t's in-memory state and reloads all bindings from the underlying IO hande.
val clear :
generation:Import.int63 ->
?hook:(unit -> unit) ->
reopen:bool ->
t ->
unitclear t clears both t's in-memory state and its underlying IO handle. The flags are passed to IO.clear.