package mirage-runtime

  1. Overview
  2. Docs

Module Mirage_runtime.ArgSource

Mirage command-line arguments

include module type of Functoria_runtime.Arg

Runtime command-line arguments

Sourcetype 'a t

The type for runtime command-line arguments. Similar to Functoria.Key.Arg.t but only available at runtime.

opt is the runtime companion of Functoria.Ky.Arg.opt.

required is the runtime companion of Functoria.Key.Arg.required.

Sourceval key : ?default:'a -> 'a Cmdliner.Arg.converter -> Cmdliner.Arg.info -> 'a t

key is either opt or required, depending if ~default is provided.

Sourceval flag : Cmdliner.Arg.info -> bool t

flag is the runtime companion of Functoria.Key.Arg.flag.

Sourceval make : (string -> ('a, [ `Msg of string ]) result) -> ('a -> string) -> 'a Cmdliner.Arg.converter

make of_string pp is the command-line argument converter using on of_string and pp.

Sourcemodule type S = sig ... end

S is the signature used by of_module to create a command-line argument converter.

Sourceval of_module : (module S with type t = 'a) -> 'a Cmdliner.Arg.converter

of module (module M) creates a command-line argyument converter from a module satisfying the signature S.

Mirage command-line argument converters

Sourceval ip_address : Ipaddr.t Cmdliner.Arg.converter

ip converts IP address.

Sourceval ipv4_address : Ipaddr.V4.t Cmdliner.Arg.converter

ipv4_address converts an IPv4 address.

Sourceval ipv4 : Ipaddr.V4.Prefix.t Cmdliner.Arg.converter

ipv4 converts ipv4/netmask to Ipaddr.V4.t * Ipaddr.V4.Prefix.t .

Sourceval ipv6_address : Ipaddr.V6.t Cmdliner.Arg.converter

ipv6_addressconverts IPv6 address.

Sourceval ipv6 : Ipaddr.V6.Prefix.t Cmdliner.Arg.converter

ipv6 converts IPv6 prefixes.

Sourceval log_threshold : log_threshold Cmdliner.Arg.converter

log_threshold converts log reporter threshold.

Sourceval allocation_policy : [ `Next_fit | `First_fit | `Best_fit ] Cmdliner.Arg.converter

allocation_policy converts allocation policy.

OCaml

Innovation. Community. Security.