albatross/src/vmm_vmmd.mli

42 lines
1.3 KiB
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
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
type 'a create =
Vmm_commands.wire *
2019-10-11 21:04:59 +00:00
('a t -> ('a t * Vmm_commands.wire * Vmm_commands.wire * Vmm_commands.wire *
Name.t * Unikernel.t, [ `Msg of string ]) result) *
(unit -> Vmm_commands.wire)
2018-11-13 00:02:05 +00:00
val handle_shutdown : 'a t -> Name.t -> Unikernel.t ->
[ `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
val handle_create : 'a t -> Vmm_commands.header ->
Name.t -> Unikernel.config ->
2019-10-11 21:04:59 +00:00
('a t * 'a create, [> `Msg of string ]) result
2018-10-23 22:03:36 +00:00
val handle_command : 'a t -> Vmm_commands.wire ->
('a t *
2019-10-10 23:10:33 +00:00
[ `Create of Vmm_commands.header * Name.t * Unikernel.config
| `Loop of Vmm_commands.wire
| `End of Vmm_commands.wire
2019-10-10 23:10:33 +00:00
| `Wait of Name.t * (process_exit -> Vmm_commands.wire)
| `Wait_and_create of Name.t * (Vmm_commands.header * Name.t * Unikernel.config) ],
Vmm_commands.wire) result
2018-10-22 21:20:00 +00:00
val killall : 'a t -> bool
val restore_unikernels : unit -> (Unikernel.config Vmm_trie.t, [> `Msg of string ]) result
val dump_unikernels : 'a t -> unit