module Event:sig
..end
Module dealing with events generated by domain state changes.
module Defined:sig
..end
module Undefined:sig
..end
module Started:sig
..end
module Suspended:sig
..end
module Resumed:sig
..end
module Stopped:sig
..end
module PM_suspended:sig
..end
module Lifecycle:sig
..end
module Reboot:sig
..end
module Rtc_change:sig
..end
module Watchdog:sig
..end
module Io_error:sig
..end
module Graphics_address:sig
..end
module Graphics_subject:sig
..end
module Graphics:sig
..end
module Control_error:sig
..end
module Block_job:sig
..end
module Disk_change:sig
..end
module Tray_change:sig
..end
module PM_wakeup:sig
..end
module PM_suspend:sig
..end
module Balloon_change:sig
..end
module PM_suspend_disk:sig
..end
module Device_removed:sig
..end
type
callback =
| |
Lifecycle of |
| |
Reboot of |
| |
RtcChange of |
| |
Watchdog of |
| |
IOError of |
| |
Graphics of |
| |
IOErrorReason of |
| |
ControlError of |
| |
BlockJob of |
| |
DiskChange of |
| |
TrayChange of |
| |
PMWakeUp of |
| |
PMSuspend of |
| |
BalloonChange of |
| |
PMSuspendDisk of |
| |
DeviceRemoved of |
type of a registered call back function
val register_default_impl : unit -> unit
Registers the default event loop based on poll(). This must be done before connections are opened.
Once registered call run_default_impl in a loop.
val run_default_impl : unit -> unit
Runs one iteration of the event loop. Applications will generally want to have a thread which invokes this in an infinite loop.
type
callback_id
an individual event registration
val register_any : 'a Libvirt.Connect.t ->
?dom:'a Libvirt.Domain.t ->
callback -> callback_id
register_any con ?dom callback
registers callback
to receive notification of arbitrary domain events. Return
a registration id which can be used in deregister_any
.
If ?dom
is None
then register for this kind of event on
all domains. If dom
is Some d
then register for this
kind of event only on d
.
val deregister_any : 'a Libvirt.Connect.t -> callback_id -> unit
deregister_any con id
deregisters the previously registered
callback with id id
.
type
timer_id
an individual timer event
val add_timeout : 'a Libvirt.Connect.t -> int -> (unit -> unit) -> timer_id
add_timeout con ms cb
registers cb
as a timeout callback
which will be called every ms
milliseconds
val remove_timeout : 'a Libvirt.Connect.t -> timer_id -> unit
remove_timeout con t
deregisters timeout callback t
.