Library
Module
Module type
Parameter
Class
Class type
Mirage runtime utilities.
Release v4.6.1
type log_threshold = [ `All | `Src of string ] * Logs.level option
The type for log threshold. A log level of None
disables logging.
val set_level : default:Logs.level option -> log_threshold list -> unit
set_level ~default l
set the log levels needed to have all of the log sources appearing in l
be used.
val logs : log_threshold list Cmdliner.Term.t
logs
is a command-liner term for setting the log_threshold.
module Conv : sig ... end
The OCaml runtime is usually configurable via the OCAMLRUNPARAM
environment variable. We provide boot parameters covering these options.
val backtrace : bool Cmdliner.Term.t
--backtrace
: Output a backtrace if an uncaught exception terminated the unikernel.
val randomize_hashtables : bool Cmdliner.Term.t
--randomize-hashtables
: Randomize all hash tables.
The OCaml garbage collector can be configured, as described in detail in GC control.
The following Term.ts allow boot time configuration.
val allocation_policy : [ `Next_fit | `First_fit | `Best_fit ] Cmdliner.Term.t
val minor_heap_size : int option Cmdliner.Term.t
val major_heap_increment : int option Cmdliner.Term.t
val space_overhead : int option Cmdliner.Term.t
val max_space_overhead : int option Cmdliner.Term.t
val gc_verbosity : int option Cmdliner.Term.t
val gc_window_size : int option Cmdliner.Term.t
val custom_major_ratio : int option Cmdliner.Term.t
val custom_minor_ratio : int option Cmdliner.Term.t
val custom_minor_max_size : int option Cmdliner.Term.t
val disk : string Cmdliner.Term.t
val analyze : bool Cmdliner.Term.t
val delay : int Cmdliner.Term.t
The initial delay, specified in seconds, before a unikernel starting up. Defaults to 0. Useful for tenders and environments that take some time to bring devices up.
val at_exit : (unit -> unit Lwt.t) -> unit
at_exit hook
registers hook
, which will be executed before the unikernel exits. The first hook registered will be executed last.
at_enter_iter hook
registers hook
to be executed at the beginning of each event loop iteration. The first hook registered will be executed last.
If hook
calls at_enter_iter
recursively, the new hook will run only on the next event loop iteration.
at_leave_iter hook
registers hook
to be executed at the end of each event loop iteration. See at_enter_iter
for details.
This is mainly for for developers implementing new targets.
val run_exit_hooks : unit -> unit Lwt.t
run_exit_hooks ()
calls the sequence of hooks registered with at_exit
in sequence.
run_enter_iter_hooks ()
calls the sequence of hooks registered with at_enter_iter
in sequence.
run_leave_iter_hooks ()
call the sequence of hooks registered with at_leave_iter
in sequence.
/
val with_argv : unit Cmdliner.Term.t list -> string -> string array -> unit
val runtime_args : unit -> unit Cmdliner.Term.t list
val register : 'a Cmdliner.Term.t -> unit -> 'a