[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] golang/xenlight: add DomainDestroy wrapper
commit 9b6d865e0af56e376740ba03b1ccdf316362a71e Author: Nick Rosbrook <rosbrookn@xxxxxxxxx> AuthorDate: Mon May 24 16:36:50 2021 -0400 Commit: George Dunlap <george.dunlap@xxxxxxxxxx> CommitDate: Mon Jun 21 16:49:08 2021 +0100 golang/xenlight: add DomainDestroy wrapper Add a wrapper around libxl_domain_destroy. Signed-off-by: Nick Rosbrook <rosbrookn@xxxxxxxxxxxx> Reviewed-by: George Dunlap <george.dunlap@xxxxxxxxxx> --- tools/golang/xenlight/xenlight.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/golang/xenlight/xenlight.go b/tools/golang/xenlight/xenlight.go index fc3eb0bf3f..f605f17613 100644 --- a/tools/golang/xenlight/xenlight.go +++ b/tools/golang/xenlight/xenlight.go @@ -1272,3 +1272,13 @@ func (ctx *Context) DomainCreateNew(config *DomainConfig) (Domid, error) { return Domid(cdomid), nil } + +// DomainDestroy destroys a domain given a domid. +func (ctx *Context) DomainDestroy(domid Domid) error { + ret := C.libxl_domain_destroy(ctx.ctx, C.uint32_t(domid), nil) + if ret != 0 { + return Error(ret) + } + + return nil +} -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |