From 2122b1a914cee8c4df5ae58bcca6bbd9e371dec6 Mon Sep 17 00:00:00 2001 From: Vanes Angelo <63584188+k124k3n@users.noreply.github.com> Date: Fri, 19 Apr 2024 20:22:31 +0700 Subject: [PATCH] feat(knuu): create new method StartAsync and point to StartWithoutWait (#278) * feat(knuu): create new method StartAsync and point to StartWithoutWait (#271) * docs(knuu): add comment to StartAsync refering to StartWithoutWait --- pkg/knuu/instance.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkg/knuu/instance.go b/pkg/knuu/instance.go index b05c1e4..99a6b94 100644 --- a/pkg/knuu/instance.go +++ b/pkg/knuu/instance.go @@ -964,6 +964,16 @@ func (i *Instance) AddCapabilities(capabilities []string) error { return nil } +// StartAsync starts the instance without waiting for it to be ready +// This function can only be called in the state 'Committed' or 'Stopped' +// This function will replace StartWithoutWait +func (i *Instance) StartAsync() error { + if err := i.StartWithoutWait(); err != nil { + return err + } + return nil +} + // StartWithoutWait starts the instance without waiting for it to be ready // This function can only be called in the state 'Committed' or 'Stopped' func (i *Instance) StartWithoutWait() error {