Devices.KeyCommand-line arguments for the Mirage configuration tool.
include module type of Functoria.Keymodule Arg = Functoria.Key.Argtype 'a key = 'a Functoria.Key.keyThe type for configuration keys. Keys are used to parameterize the choice of module implementation.
create n a is the key named n whose contents is determined by parsing the command-line argument a.
type +'a value = 'a Functoria.Key.valueThe type for configure-time and run-time values. Values are either pure or obtained by composing other values. Values might have data dependencies, which form an (implicit) directed and acyclic graph that need to be evaluated.
val pure : 'a -> 'a valuepure x is a value without any dependency.
f $ v is is the value resulting from the application of f'value to v's value. $ is the usual app operator for applicative functor.
val default : 'a value -> 'adefault v returns the default value for v.
type t = Functoria.Key.tThe type for abstract keys.
val name : t -> stringname t is the string given as t's name when t was created.
module Set = Functoria.Key.SetSet implements sets over t elements.
val add_to_context : 'a key -> 'a -> Functoria.Context.t -> Functoria.Context.tAdd a binding to a context.
val context : Set.t -> Functoria.Context.t Cmdliner.Term.tcontext ks is a Cmdliner term that evaluates into a parsing context for command-line arguments.
val mem : Functoria.Context.t -> 'a value -> boolmem c v is true iff all the dependencies of v have been evaluated.
val peek : Functoria.Context.t -> 'a value -> 'a optionpeek c v is Some x if mem v and None otherwise.
val eval : Functoria.Context.t -> 'a value -> 'aeval c v evaluates v in c's context, using default values if necessary.
val get : Functoria.Context.t -> 'a key -> 'aget c k is k's value in c's context. If k is not present in c, it is k's default value.
val find : Functoria.Context.t -> 'a key -> 'a optionfind c k is k's value in c's context or None if k is not present in c.
val pps : Functoria.Context.t -> Set.t Fmt.tpps c fmt ks prints the keys ks using the context c to get their value.
-t TARGET: Key setting the configuration mode for the current project. Is one of "unix", "macosx", "xen", "qubes", "virtio", "hvt", "muen", "genode" or "spt".
Some keys have a group optional argument. This group argument allows to give several keys a prefix.
For example, if we have two ip stacks, one external and one internal, We can use the group option to name them in and out. This way, the available keys will be --in-ip and --out-ip.
If a key has another, non-optional argument. It is the default value.
Keys are always named the same as their command line option.
val kv_ro : ?group:string -> unit -> [ `Crunch | `Direct ] keyThe type of key value store. Is one of "crunch", or "direct".
val block :
?group:string ->
unit ->
[ `XenstoreId | `BlockFile | `Ramdisk ] keyBlock device keys
val dhcp : ?group:string -> unit -> bool keyEnable dhcp. Is either true or false.
val net : ?group:string -> unit -> [ `OCaml | `Host ] option keyThe type of stack. Is either "ocaml" or "host".