Documentation ¶
Index ¶
- Constants
- func Create(ctx context.Context, instName string, instConfig []byte, saveBrokenYAML bool) (*store.Instance, error)
- func Delete(ctx context.Context, inst *store.Instance, force bool) error
- func LimactlShellCmd(instName string) string
- func ShowMessage(inst *store.Instance) error
- func Start(ctx context.Context, inst *store.Instance, limactl string, ...) error
- func StopForcibly(inst *store.Instance)
- func StopGracefully(inst *store.Instance) error
- func WithWatchHostAgentTimeout(ctx context.Context, timeout time.Duration) context.Context
- type Prepared
Constants ¶
const DefaultWatchHostAgentEventsTimeout = 10 * time.Minute
DefaultWatchHostAgentEventsTimeout is the duration to wait for the instance to be running before timing out.
Variables ¶
This section is empty.
Functions ¶
func LimactlShellCmd ¶
func ShowMessage ¶
func Start ¶
func Start(ctx context.Context, inst *store.Instance, limactl string, launchHostAgentForeground bool) error
Start starts the hostagent in the background, which in turn will start the instance. Start will listen to hostagent events and log them to STDOUT until either the instance is running, or has failed to start.
The `limactl` argument allows the caller to specify the full path of the `limactl` executable. When called from inside limactl itself it will always be the empty string which uses the name of the current executable instead.
The `launchHostAgentForeground` argument makes the hostagent run in the foreground. The function will continue to listen and log hostagent events until the instance is shut down again.
Start calls Prepare by itself, so you do not need to call Prepare manually before calling Start.