Documentation
¶
Index ¶
- Constants
- func CloneOrRename(ctx context.Context, oldInst *limatype.Instance, newInstName string, ...) (*limatype.Instance, error)
- func Create(ctx context.Context, instName string, instConfig []byte, saveBrokenYAML bool) (*limatype.Instance, error)
- func Delete(ctx context.Context, inst *limatype.Instance, force bool) error
- func LimactlShellCmd(instName string) string
- func Restart(ctx context.Context, inst *limatype.Instance, showProgress bool) error
- func RestartForcibly(ctx context.Context, inst *limatype.Instance, showProgress bool) error
- func ShowMessage(inst *limatype.Instance) error
- func Start(ctx context.Context, inst *limatype.Instance, ...) error
- func StartWithPaths(ctx context.Context, inst *limatype.Instance, ...) error
- func StopForcibly(inst *limatype.Instance)
- func StopGracefully(ctx context.Context, inst *limatype.Instance, isRestart bool) 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 CloneOrRename ¶
func LimactlShellCmd ¶
func RestartForcibly ¶
func ShowMessage ¶
func StartWithPaths ¶
func StartWithPaths(ctx context.Context, inst *limatype.Instance, launchHostAgentForeground, showProgress bool, limactl, guestAgent string) error
StartWithPaths starts the hostagent in the background, which in turn will start the instance. StartWithPaths will listen to hostagent events and log them to STDOUT until either the instance is running, or has failed to start.
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.
The showProgress argument tells the hostagent to show provision script progress by tailing cloud-init logs.
The limactl argument allows the caller to specify the full path of the limactl executable. The guestAgent argument allows the caller to specify the full path of the guest agent executable. Inside limactl this function is only called by Start, which passes empty strings for both limactl and guestAgent, in which case the location of the current executable is used for limactl and the guest agent is located from the corresponding <prefix>/share/lima directory.
StartWithPaths calls Prepare by itself, so you do not need to call Prepare manually before calling Start.