package mirage

  1. Overview
  2. Docs

Configuration keys.

Command-line arguments for Mirage applications.

include module type of Functoria.Runtime_arg

The type command-line arguments where the type of the value is abstract.

val packages : t -> Functoria.Package.t list

Set implements sets over t elements.

Code Serialization

val call : t Fmt.t

call fmt k outputs name () to fmt, where n is k's OCaml name.

val serialize : runtime_modname:string -> t Fmt.t

serialize ctx ppf k outputs the Cmdliner runes to parse command-line arguments represented by k at runtime.

val var_name : t -> string
type 'a arg = 'a Functoria.DSL.runtime_arg

The type for command-line arguments that reads a value of type 'a.

val create : pos:(string * int * int * int) -> ?packages:Functoria.DSL.package list -> string -> 'a arg

v k is the k with its type hidden.

OCaml Arguments

The OCaml runtime is usually configurable via the OCAMLRUNPARAM environment variable. We provide boot parameters covering these options.

val backtrace : bool Functoria.DSL.runtime_arg

--backtrace: Output a backtrace if an uncaught exception terminated the unikernel.

val randomize_hashtables : bool Functoria.DSL.runtime_arg

--randomize-hashtables: Randomize all hash tables.

GC control

The OCaml garbage collector can be configured, as described in detail in GC control.

The following arguments allow boot time configuration.

val allocation_policy : [ `Next_fit | `First_fit | `Best_fit ] Functoria.DSL.runtime_arg
val minor_heap_size : int option Functoria.DSL.runtime_arg
val major_heap_increment : int option Functoria.DSL.runtime_arg
val space_overhead : int option Functoria.DSL.runtime_arg
val max_space_overhead : int option Functoria.DSL.runtime_arg
val gc_verbosity : int option Functoria.DSL.runtime_arg
val gc_window_size : int option Functoria.DSL.runtime_arg
val custom_major_ratio : int option Functoria.DSL.runtime_arg
val custom_minor_ratio : int option Functoria.DSL.runtime_arg
val custom_minor_max_size : int option Functoria.DSL.runtime_arg

Network Arguments

val interface : ?group:string -> ?docs:string -> string -> string Functoria.DSL.runtime_arg

A network interface.

Ipv4 Arguments.

Ipv6 Arguments.

val ipv4_only : ?group:string -> ?docs:string -> unit -> bool Functoria.DSL.runtime_arg

An option for dual stack to only use IPv4.

val ipv6_only : ?group:string -> ?docs:string -> unit -> bool Functoria.DSL.runtime_arg

An option for dual stack to only use IPv6.

val resolver : ?group:string -> ?docs:string -> ?default:string list -> unit -> string list option Functoria.DSL.runtime_arg

The address of the DNS resolver to use. See $REFERENCE for format.

val dns_servers : ?group:string -> ?docs:string -> string list option -> string list option Functoria.DSL.runtime_arg

The addresses of the DNS servers to use.

val dns_timeout : ?group:string -> ?docs:string -> int64 option -> int64 option Functoria.DSL.runtime_arg

The timeout (in nanoseconds) for DNS resolution.

val dns_cache_size : ?group:string -> ?docs:string -> int option -> int option Functoria.DSL.runtime_arg

The cache size of the LRU cache used for DNS resolution.

val he_aaaa_timeout : ?group:string -> ?docs:string -> int64 option -> int64 option Functoria.DSL.runtime_arg

The timeout (in nanoseconds) for IPv6 resolution.

val he_connect_delay : ?group:string -> ?docs:string -> int64 option -> int64 option Functoria.DSL.runtime_arg

The delay (in nanoseconds) for establishing connections.

val he_connect_timeout : ?group:string -> ?docs:string -> int64 option -> int64 option Functoria.DSL.runtime_arg

The timeout (in nanoseconds) for establishing connections.

val he_resolve_timeout : ?group:string -> ?docs:string -> int64 option -> int64 option Functoria.DSL.runtime_arg

The timeout (in nanoseconds) for resolving hostnames.

val he_resolve_retries : ?group:string -> ?docs:string -> int option -> int option Functoria.DSL.runtime_arg

The number of resolution attempts before an error is returned.

val he_timer_interval : ?group:string -> ?docs:string -> int64 option -> int64 option Functoria.DSL.runtime_arg

The interval (in nanoseconds) when the timer is executed.

val ssh_key : ?group:string -> ?docs:string -> string option -> string option Functoria.DSL.runtime_arg

A SSH private key.

val ssh_password : ?group:string -> ?docs:string -> string option -> string option Functoria.DSL.runtime_arg

A SSH password.

val ssh_authenticator : ?group:string -> ?docs:string -> string option -> string option Functoria.DSL.runtime_arg

A SSH authenticator.

val tls_authenticator : ?group:string -> ?docs:string -> string option -> string option Functoria.DSL.runtime_arg

A TLS authenticator.

val http_headers : ?group:string -> ?docs:string -> (string * string) list option -> (string * string) list option Functoria.DSL.runtime_arg

HTTP headers.

val syslog : ?group:string -> ?docs:string -> Ipaddr.t option -> Ipaddr.t option Functoria.DSL.runtime_arg

The address to send syslog frames to.

val monitor : ?group:string -> ?docs:string -> Ipaddr.t option -> Ipaddr.t option Functoria.DSL.runtime_arg

The address to send monitor statistics to.

val syslog_port : ?group:string -> ?docs:string -> int option -> int option Functoria.DSL.runtime_arg

The port to send syslog frames to.

val syslog_hostname : ?group:string -> ?docs:string -> string -> string Functoria.DSL.runtime_arg

The hostname to use in syslog frames.

Logs

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

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

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.

OCaml

Innovation. Community. Security.