Module Make.Config

type t = {
id : string;

unique name for prometheus metrics

discard : bool;

true if `discard` will be enabled at runtime

keep_erased : int64 option;

size of erased free pool in sectors

compact_after_unmaps : int64 option;

automatically compact after n sectors are unmapped

check_on_connect : bool;

perform an integrity check on connect

runtime_asserts : bool;

check cluster invariants at runtime

read_only : bool;

guarantee to not modify the file

}

Runtime configuration of a device

val create : ?⁠id:string -> ?⁠discard:bool -> ?⁠keep_erased:int64 -> ?⁠compact_after_unmaps:int64 -> ?⁠check_on_connect:bool -> ?⁠runtime_asserts:bool -> ?⁠read_only:bool -> unit -> t

Customise the runtime behaviour, see connect or create

val to_string : t -> string

Marshal a config into a string suitable for a command-line argument

val of_string : string -> (t[ `Msg of string ]) Stdlib.result

Parse the result of a previous to_string invocation