albatross/src/vmm_vmmd.mli

33 lines
960 B
OCaml
Raw Normal View History

2018-10-23 22:13:47 +00:00
(* (c) 2017, 2018 Hannes Mehnert, all rights reserved *)
2018-10-22 21:20:00 +00:00
2018-11-13 00:02:05 +00:00
open Vmm_core
2018-10-22 21:20:00 +00:00
type 'a t
2018-10-23 22:03:36 +00:00
val init : Vmm_commands.version -> 'a t
2018-10-22 21:20:00 +00:00
type service_out = [
2018-10-23 22:03:36 +00:00
| `Stat of Vmm_commands.wire
| `Log of Vmm_commands.wire
| `Cons of Vmm_commands.wire
2018-10-22 21:20:00 +00:00
]
2018-10-23 22:03:36 +00:00
type out = [ service_out | `Data of Vmm_commands.wire ]
2018-10-22 21:20:00 +00:00
2018-11-13 00:02:05 +00:00
val handle_shutdown : 'a t -> Name.t -> Unikernel.t ->
2018-10-22 21:20:00 +00:00
[ `Exit of int | `Signal of int | `Stop of int ] -> 'a t * out list
2018-10-23 22:03:36 +00:00
val handle_command : 'a t -> Vmm_commands.wire ->
2018-10-22 21:20:00 +00:00
'a t * out list *
2018-11-13 00:02:05 +00:00
[ `Create of 'c t -> 'c -> ('c t * out list * Name.t * Unikernel.t, [> `Msg of string ]) result
| `Loop
2018-10-22 21:20:00 +00:00
| `End
| `Wait of 'a * out
2018-10-22 21:20:00 +00:00
| `Wait_and_create of 'a * ('a t -> 'a t * out list *
2018-11-13 00:02:05 +00:00
[ `Create of 'd t -> 'd -> ('d t * out list * Name.t * Unikernel.t, [> Rresult.R.msg ]) result
2018-10-22 21:20:00 +00:00
| `End ]) ]
2018-11-13 00:02:05 +00:00
val setup_stats : 'a t -> Name.t -> Unikernel.t -> 'a t * out
val kill : 'a t -> unit