Documentation
¶
Overview ¶
Package qevent implements a JSON-based event channel between guest and host.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrEventChannelMissingDoneEvent = errors.New("never received the final event channel event (did you call Close() on the guest event channel emitter?)")
ErrEventChannelMissingDoneEvent is returned when the final event channel event is not received.
Functions ¶
func EventChannel ¶
EventChannel adds a virtio-serial-backed channel between host and guest to send JSON events (T).
Use guest.SerialEventChannel with the same name to get access to the emitter in the guest.
Guest events will be sent on the supplied channel. The channel will be closed when the guest exits or indicates that no more events are coming. If the guest exits without indicating that no more events are coming, the VM exit will return an error. (guest.SerialEventChannel.Close emits this "done" event.)
If the channel is blocking, guest event processing is blocked as well.
func EventChannelCallback ¶
EventChannelCallback adds a virtio-serial-backed channel between host and guest to send JSON events (T).
Use guest.SerialEventChannel with the same name to get access to the emitter in the guest.
When a guest event occurs, the callback is called.
Types ¶
This section is empty.