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
|
|
|
|
|
2019-11-11 20:49:51 +00:00
|
|
|
val init : unit -> 'a t
|
2018-10-22 21:20:00 +00:00
|
|
|
|
2019-01-20 20:41:49 +00:00
|
|
|
val waiter : 'a t -> Name.t -> 'a t * 'a option
|
|
|
|
|
2019-10-11 21:04:59 +00:00
|
|
|
val register : 'a t -> Name.t -> (unit -> 'b * 'a) -> 'a t * 'b
|
2019-10-10 23:10:33 +00:00
|
|
|
|
|
|
|
val register_restart : 'a t -> Name.t -> (unit -> 'b * 'a) -> ('a t * 'b) option
|
2019-01-20 20:41:49 +00:00
|
|
|
|
2019-01-20 21:04:41 +00:00
|
|
|
type 'a create =
|
2019-01-27 15:07:53 +00:00
|
|
|
Vmm_commands.wire *
|
2019-11-11 20:49:51 +00:00
|
|
|
('a t -> ('a t * Vmm_commands.wire * Vmm_commands.wire * Vmm_commands.res * Name.t * Unikernel.t, [ `Msg of string ]) result) *
|
|
|
|
(unit -> Vmm_commands.res)
|
2019-01-20 21:04:41 +00:00
|
|
|
|
2018-11-13 00:02:05 +00:00
|
|
|
val handle_shutdown : 'a t -> Name.t -> Unikernel.t ->
|
2019-01-27 15:07:53 +00:00
|
|
|
[ `Exit of int | `Signal of int | `Stop of int ] -> 'a t * Vmm_commands.wire * Vmm_commands.wire
|
2018-10-22 21:20:00 +00:00
|
|
|
|
2019-11-11 20:49:51 +00:00
|
|
|
val handle_create : 'a t -> Name.t -> Unikernel.config ->
|
2019-10-11 21:04:59 +00:00
|
|
|
('a t * 'a create, [> `Msg of string ]) result
|
2019-01-20 21:17:59 +00:00
|
|
|
|
2018-10-23 22:03:36 +00:00
|
|
|
val handle_command : 'a t -> Vmm_commands.wire ->
|
2019-01-27 15:07:53 +00:00
|
|
|
('a t *
|
2019-11-11 20:49:51 +00:00
|
|
|
[ `Create of Name.t * Unikernel.config
|
|
|
|
| `Loop of Vmm_commands.res
|
|
|
|
| `End of Vmm_commands.res
|
|
|
|
| `Wait of Name.t * (process_exit -> Vmm_commands.res)
|
|
|
|
| `Wait_and_create of Name.t * (Name.t * Unikernel.config) ],
|
|
|
|
Vmm_commands.res) result
|
2018-10-22 21:20:00 +00:00
|
|
|
|
2019-01-20 21:01:52 +00:00
|
|
|
val killall : 'a t -> bool
|
2019-01-20 21:17:59 +00:00
|
|
|
|
|
|
|
val restore_unikernels : unit -> (Unikernel.config Vmm_trie.t, [> `Msg of string ]) result
|
|
|
|
|
|
|
|
val dump_unikernels : 'a t -> unit
|