golang/xenlight: add SendTrigger wrapper

Add a warpper around libxl_send_trigger.

Signed-off-by: Nick Rosbrook <rosbrookn@ainfosec.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
This commit is contained in:
Nick Rosbrook authored and George Dunlap committed 2021-06-21 16:49:08 +01:00
1 parent 9b6d865e0a
commit 1d95fd75df
1 file changed
+11
+11
View File
@@ -1282,3 +1282,14 @@ func (ctx *Context) DomainDestroy(domid Domid) error {
return nil
}
// SendTrigger sends a Trigger to the domain specified by domid.
func (ctx *Context) SendTrigger(domid Domid, trigger Trigger, vcpuid int) error {
ret := C.libxl_send_trigger(ctx.ctx, C.uint32_t(domid),
C.libxl_trigger(trigger), C.uint32_t(vcpuid), nil)
if ret != 0 {
return Error(ret)
}
return nil
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.