package mirage-runtime

  1. Overview
  2. Docs
The base MirageOS runtime library, part of every MirageOS unikernel

Install

Dune Dependency

Authors

Maintainers

Sources

mirage-4.9.0.tbz
sha256=0c07d59eb52dc3d1506eb4121c4953104a12df79d08a0f0923c9b71e7474a026
sha512=666bf9ee20c9f9de058441f252f4f40ceec6a9ffd00e5cd3b7bfa9532fd65000aeb8a83f9e55586be98d0a86ea72f2dda94e924608135e3d63441359505de58a

doc/mirage-runtime/Mirage_runtime/index.html

Module Mirage_runtimeSource

Mirage runtime utilities.

Release v4.9.0

Log thresholds

Sourcetype log_threshold = [ `All | `Src of string ] * Logs.level option

The type for log threshold. A log level of None disables logging.

Sourceval 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.

Sourceval logs : log_threshold list Cmdliner.Term.t

logs is a command-liner term for setting the log_threshold.

Sourcemodule Conv : sig ... end
Sourceval s_net : string

Manpage sections

s_net is used for network options.

Sourceval s_disk : string

s_disk is used for disk options.

Sourceval s_log : string

s_log is used for logging and monitoring options.

Sourceval s_he : string

s_he is used for happy eyeballs options.

Sourceval s_dns : string

s_dns is used for DNS options.

Sourceval s_ssh : string

s_ssh is used for SSH options.

Sourceval s_tls : string

s_tls is used for TLS options.

Sourceval s_http : string

s_http is used for HTTP options.

Blocks

Sourceval disk : string Cmdliner.Term.t
Sourceval analyze : bool Cmdliner.Term.t

Startup delay

Sourceval 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.

Registering scheduler hooks

Sourceval 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.

Sourceval at_enter_iter : (unit -> unit) -> unit

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.

Sourceval at_leave_iter : (unit -> unit) -> unit

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.

Sourceval run_exit_hooks : unit -> unit Lwt.t

run_exit_hooks () calls the sequence of hooks registered with at_exit in sequence.

Sourceval run_enter_iter_hooks : unit -> unit

run_enter_iter_hooks () calls the sequence of hooks registered with at_enter_iter in sequence.

Sourceval run_leave_iter_hooks : unit -> unit

run_leave_iter_hooks () call the sequence of hooks registered with at_leave_iter in sequence.

Exit Codes

Sourceval argument_error : int

argument_error is the exit code used for argument parsing errors: 64.

Sourceval help_version : int

help_version is the exit code used when help/version is used: 63.

Sourceval register_arg : 'a Cmdliner.Term.t -> unit -> 'a

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 ())).

/

Sourceval with_argv : unit Cmdliner.Term.t list -> string -> string array -> unit
Sourceval runtime_args : unit -> unit Cmdliner.Term.t list
Sourceval register : 'a Cmdliner.Term.t -> unit -> 'a
  • deprecated Use Mirage_runtime.register_arg instead.
OCaml

Innovation. Community. Security.