Skip to content

Commit

Permalink
style: unify whitespace before ':'
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesm committed Dec 25, 2016
1 parent 9b270f9 commit 11df4d9
Showing 1 changed file with 63 additions and 62 deletions.
125 changes: 63 additions & 62 deletions lib/mirage.mli
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ include Functoria_app.DSL
type tracing
(** The type for tracing. *)

val tracing: tracing typ
val tracing : tracing typ
(** Implementation of the {!tracing} type. *)

val mprof_trace : size:int -> unit -> tracing impl
Expand All @@ -59,10 +59,10 @@ val default_qubesdb : qubesdb impl
type time
(** Abstract type for timers. *)

val time: time typ
val time : time typ
(** Implementations of the [V1.TIME] signature. *)

val default_time: time impl
val default_time : time impl
(** The default timer implementation. *)


Expand All @@ -72,16 +72,16 @@ val default_time: time impl
type pclock
(** Abstract type for POSIX clocks. *)

val pclock: pclock typ
val pclock : pclock typ
(** Implementations of the {!V1.PCLOCK} signature. *)

val default_posix_clock: pclock impl
val default_posix_clock : pclock impl
(** The default mirage-clock PCLOCK implementation. *)

type mclock
(** Abstract type for monotonic clocks *)

val mclock: mclock typ
val mclock : mclock typ
(** Implementations of the {!V1.MCLOCK} signature. *)

val default_monotonic_clock: mclock impl
Expand All @@ -94,10 +94,10 @@ val default_monotonic_clock: mclock impl
type reporter
(** The type for log reporters. *)

val reporter: reporter typ
val reporter : reporter typ
(** Implementation of the log {!reporter} type. *)

val default_reporter:
val default_reporter :
?clock:pclock impl -> ?ring_size:int -> ?level:Logs.level ->
unit -> reporter impl
(** [default_reporter ?clock ?level ()] is the log reporter that
Expand All @@ -106,7 +106,7 @@ val default_reporter:
the default log threshold. It is [Logs.Info] if not
specified. *)

val no_reporter: reporter impl
val no_reporter : reporter impl
(** [no_reporter] disable log reporting. *)


Expand All @@ -116,16 +116,16 @@ val no_reporter: reporter impl
type random
(** Abstract type for random sources. *)

val random: random typ
val random : random typ
(** Implementations of the [V1.RANDOM] signature. *)

val stdlib_random: random impl
val stdlib_random : random impl
(** Passthrough to the OCaml Random generator. *)

val nocrypto_random: random impl
val nocrypto_random : random impl
(** Passthrough to the Fortuna PRNG implemented in nocrypto. *)

val default_random: random impl
val default_random : random impl
(** Default PRNG device to be used in unikernels. It defaults to {!stdlib}, but
users can override using the {!Key.prng} command line argument.
*)
Expand All @@ -137,13 +137,13 @@ val default_random: random impl
type console
(** Abstract type for consoles. *)

val console: console typ
val console : console typ
(** Implementations of the [V1.CONSOLE] signature. *)

val default_console: console impl
val default_console : console impl
(** Default console implementation. *)

val custom_console: string -> console impl
val custom_console : string -> console impl
(** Custom console implementation. *)


Expand All @@ -153,10 +153,10 @@ val custom_console: string -> console impl
type io_page
(** Abstract type for page-aligned buffers. *)

val io_page: io_page typ
val io_page : io_page typ
(** Implementations of the [V1.IO_PAGE] signature. *)

val default_io_page: io_page impl
val default_io_page : io_page impl
(** The default [Io_page] implementation. *)


Expand All @@ -167,10 +167,10 @@ val default_io_page: io_page impl
type block
(** Abstract type for raw block device configurations. *)

val block: block typ
val block : block typ
(** Implementations of the [V1.BLOCK] signature. *)

val block_of_file: string -> block impl
val block_of_file : string -> block impl
(** Use the given filen as a raw block device. *)


Expand All @@ -180,17 +180,17 @@ val block_of_file: string -> block impl
type kv_ro
(** Abstract type for read-only key/value store. *)

val kv_ro: kv_ro typ
val kv_ro : kv_ro typ
(** Implementations of the [V1.KV_RO] signature. *)

val crunch: string -> kv_ro impl
val crunch : string -> kv_ro impl
(** Crunch a directory. *)

val archive: block impl -> kv_ro impl
val archive : block impl -> kv_ro impl

val archive_of_files: ?dir:string -> unit -> kv_ro impl
val archive_of_files : ?dir:string -> unit -> kv_ro impl

val direct_kv_ro: string -> kv_ro impl
val direct_kv_ro : string -> kv_ro impl
(** Direct access to the underlying filesystem as a key/value
store. For Xen backends, this is equivalent to [crunch]. *)

Expand All @@ -202,19 +202,19 @@ val direct_kv_ro: string -> kv_ro impl
type fs
(** Abstract type for filesystems. *)

val fs: fs typ
val fs : fs typ
(** Implementations of the [V1.FS] signature. *)

val fat: ?io_page:io_page impl -> block impl -> fs impl
val fat : ?io_page:io_page impl -> block impl -> fs impl
(** Consider a raw block device as a FAT filesystem. *)

val fat_of_files: ?dir:string -> ?regexp:string -> unit -> fs impl
val fat_of_files : ?dir:string -> ?regexp:string -> unit -> fs impl
(** [fat_files dir ?dir ?regexp ()] collects all the files matching
the shell pattern [regexp] in the directory [dir] into a FAT
image. By default, [dir] is the current working directory and
[regexp] is {i *} *)

val kv_ro_of_fs: fs impl -> kv_ro impl
val kv_ro_of_fs : fs impl -> kv_ro impl
(** Consider a filesystem implementation as a read-only key/value
store. *)

Expand All @@ -236,10 +236,10 @@ val generic_kv_ro :
type network
(** Abstract type for network configurations. *)

val network: network typ
val network : network typ
(** Implementations of the [V1.NETWORK] signature. *)

val default_network: network impl
val default_network : network impl
(** [default_network] is a dynamic network implementation
* which attempts to do something reasonable based on the target. *)

Expand All @@ -255,7 +255,7 @@ type ethernet
val ethernet : ethernet typ
(** Implementations of the [V1.ETHIF] signature. *)

val etif: network impl -> ethernet impl
val etif : network impl -> ethernet impl

(** {2 ARP configuration} *)

Expand All @@ -264,7 +264,8 @@ type arpv4
val arpv4 : arpv4 typ
(** Implementation of the [V1.ARPV4] signature. *)

val arp: ?clock: mclock impl -> ?time: time impl -> ethernet impl -> arpv4 impl
val arp : ?clock:mclock impl -> ?time:time impl -> ethernet impl -> arpv4 impl
(** Default ARPv4 implementation provided by the tcpip library *)

(** {2 IP configuration}
Expand All @@ -278,10 +279,10 @@ type 'a ip
type ipv4 = v4 ip
type ipv6 = v6 ip

val ipv4: ipv4 typ
val ipv4 : ipv4 typ
(** The [V1.IPV4] module signature. *)

val ipv6: ipv6 typ
val ipv6 : ipv6 typ
(** The [V1.IPV6] module signature. *)

type ipv4_config = {
Expand All @@ -292,8 +293,8 @@ type ipv4_config = {

type ipv6_config = {
addresses : Ipaddr.V6.t list;
netmasks : Ipaddr.V6.Prefix.t list;
gateways : Ipaddr.V6.t list;
netmasks : Ipaddr.V6.Prefix.t list;
gateways : Ipaddr.V6.t list;
}
(** Types for IP manual configuration. *)

Expand All @@ -309,7 +310,7 @@ val ipv4_qubes : qubesdb impl -> ethernet impl -> arpv4 impl -> ipv4 impl
(** Use a given initialized QubesDB to look up and configure the appropriate
* IPv4 interface. *)

val create_ipv6:
val create_ipv6 :
?time:time impl -> ?clock:mclock impl ->
?group:string -> ethernet impl -> ipv6_config -> ipv6 impl
(** Use an IPv6 address.
Expand All @@ -325,13 +326,13 @@ type udpv4 = v4 udp
type udpv6 = v6 udp

(** Implementation of the [V1.UDP] signature. *)
val udp: 'a udp typ
val udpv4: udpv4 typ
val udpv6: udpv6 typ
val udp : 'a udp typ
val udpv4 : udpv4 typ
val udpv6 : udpv6 typ

val direct_udp: ?random:random impl -> 'a ip impl -> 'a udp impl
val direct_udp : ?random:random impl -> 'a ip impl -> 'a udp impl

val socket_udpv4: ?group:string -> Ipaddr.V4.t option -> udpv4 impl
val socket_udpv4 : ?group:string -> Ipaddr.V4.t option -> udpv4 impl



Expand All @@ -342,11 +343,11 @@ type tcpv4 = v4 tcp
type tcpv6 = v6 tcp

(** Implementation of the [V1.TCP] signature. *)
val tcp: 'a tcp typ
val tcpv4: tcpv4 typ
val tcpv6: tcpv6 typ
val tcp : 'a tcp typ
val tcpv4 : tcpv4 typ
val tcpv6 : tcpv6 typ

val direct_tcp:
val direct_tcp :
?clock:mclock impl ->
?random:random impl ->
?time:time impl ->
Expand All @@ -360,33 +361,33 @@ val socket_tcpv4: ?group:string -> Ipaddr.V4.t option -> tcpv4 impl

type stackv4

val stackv4: stackv4 typ
val stackv4 : stackv4 typ
(** Implementation of the [V1.STACKV4] signature. *)

(** Direct network stack with given ip. *)
val direct_stackv4:
val direct_stackv4 :
?clock:mclock impl ->
?random:random impl ->
?time:time impl ->
?group:string ->
network impl -> ethernet impl -> arpv4 impl -> ipv4 impl -> stackv4 impl

(** Network stack with sockets. Exposes the key {Key.interfaces}. *)
val socket_stackv4:
val socket_stackv4 :
?group:string -> Ipaddr.V4.t list -> stackv4 impl

(** Build a stackv4 by looking up configuration information via QubesDB,
* building an ipv4, then building a stack on top of that. *)
val qubes_ipv4_stack : ?group:string -> ?qubesdb : qubesdb impl -> network impl -> stackv4 impl
val qubes_ipv4_stack : ?group:string -> ?qubesdb:qubesdb impl -> network impl -> stackv4 impl

(** Build a stackv4 by obtaining a DHCP lease, using the lease to
* build an ipv4, then building a stack on top of that. *)
val dhcp_ipv4_stack : ?group:string -> ?time : time impl -> network impl -> stackv4 impl
val dhcp_ipv4_stack : ?group:string -> ?time:time impl -> network impl -> stackv4 impl

(** Build a stackv4 by checking the {Key.ip4}, and {Key.ipv4-gateway} keys
* for ipv4 configuration information, filling in unspecified information from [?config],
* then building a stack on top of that. *)
val static_ipv4_stack : ?group:string -> ?config : ipv4_config -> network impl -> stackv4 impl
val static_ipv4_stack : ?group:string -> ?config:ipv4_config -> network impl -> stackv4 impl

(** Generic stack using a [dhcp] and a [net] keys: {!Key.net} and {!Key.dhcp}.
- If [target] = [Qubes] then {!qubes_ipv4_stack} is used.
Expand All @@ -406,7 +407,7 @@ val generic_stackv4 :
(** {2 Resolver configuration} *)

type resolver
val resolver: resolver typ
val resolver : resolver typ
val resolver_dns :
?ns:Ipaddr.V4.t -> ?ns_port:int -> ?time:time impl -> stackv4 impl -> resolver impl
val resolver_unix_system : resolver impl
Expand Down Expand Up @@ -455,38 +456,38 @@ val nocrypto : job impl
(** {2 Conduit configuration} *)

type conduit
val conduit: conduit typ
val conduit : conduit typ
val conduit_direct : ?tls:bool -> stackv4 impl -> conduit impl

(** {2 HTTP configuration} *)

type http
val http: http typ
val http_server: conduit impl -> http impl
val http : http typ
val http_server : conduit impl -> http impl

(** {2 Argv configuration} *)

val default_argv: Functoria_app.argv impl
val default_argv : Functoria_app.argv impl
(** [default_argv] is a dynamic argv implementation
* which attempts to do something reasonable based on the target. *)

val no_argv: Functoria_app.argv impl
val no_argv : Functoria_app.argv impl
(** [no_argv] Disable command line parsing and set argv to [|""|]. *)

(** {2 Other devices} *)

val noop: job impl
val noop : job impl
(** [noop] is a job that does nothing, has no dependency and returns [()] *)

type info
(** [info] is the type for module implementing
{!Mirage_runtime.Info}. *)

val info: info typ
val info : info typ
(** [info] is the combinator to generate {!info} values to use at
runtime. *)

val app_info: info impl
val app_info : info impl
(** [app_info] exports all the information available at configure time
into a runtime {!Mirage.Info.t} value. *)

Expand Down

0 comments on commit 11df4d9

Please sign in to comment.