package mirage-runtime
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4184cbc7e51b0dcdcf4345c98818c34129ff42879ef091e54849faa57b29d397
sha512=cb54de5a1741c9b5702a5c5290feb01c41ac39b220bf7d249dbaf6506834f1ac5c832726230e8ecd2fbc49f5550f9109560434e01746f0d20b6b6578e7174961
doc/mirage-runtime/Mirage_runtime/index.html
Module Mirage_runtime
Source
Mirage runtime utilities.
Release v4.10.2
Log thresholds
The type for log threshold. A log level of None
disables logging.
set_level ~default l
set the log levels needed to have all of the log sources appearing in l
be used.
logs
is a command-liner term for setting the log_threshold.
Command-line converters
Manpage sections
s_net
is used for network options.
s_disk
is used for disk options.
s_log
is used for logging and monitoring options.
s_he
is used for happy eyeballs options.
s_dns
is used for DNS options.
s_ssh
is used for SSH options.
s_tls
is used for TLS options.
s_http
is used for HTTP options.
Blocks
Startup delay
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.
Name
The name key.
The current name of the unikernel. This is expected to be the same during the lifetime of an unikernel (but there's no guarantee since it can be modified).
Registering scheduler hooks
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.
Running hooks
This is mainly for for developers implementing new targets.
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.
Exit Codes
argument_error
is the exit code used for argument parsing errors: 64.
help_version
is the exit code used when help/version is used: 63.
Runtime Arguments
register_arg term
registers term to be evaluated at boot time. An example is: let hello = register_arg <myterm>
(at the toplevel of the unikernel), and in the unikernel code Logs.info (fun m -> m "hello argument is: %s" (hello ()))
.