lifecycle

package
v2026.1114.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2026 License: MIT Imports: 23 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyLocalUpdate

func ApplyLocalUpdate(ctx context.Context, tag, staged, target string, desktopStaged ...string) error

ApplyLocalUpdate applies a verified local build using the same runtime handoff.

func ApplyReleaseUpdateForTest added in v2026.1024.0

func ApplyReleaseUpdateForTest(ctx context.Context, tag string, hooks UpdateOpsForTest) error

ApplyReleaseUpdateForTest uses real release preparation and commit, replacing process operations so tests cannot stop or restart the user's installation.

func ApplyUpdateForTest

func ApplyUpdateForTest(ctx context.Context, tag string, ops UpdateOpsForTest) error

func HotInstall

func HotInstall(ctx context.Context, target, defaultDevDir string, install func() error) error

HotInstall replaces the local installation while its daemon and native clients are stopped, then starts fresh processes in the daemon's previous mode.

func HotInstallForTest

func HotInstallForTest(target string, install func() error, ops UpdateOpsForTest) error

func HotInstallWithProgress added in v2026.1011.0

func HotInstallWithProgress(ctx context.Context, target, defaultDevDir string, install func() error, progress func(string)) error

HotInstallWithProgress reports shutdown and restart when those phases begin.

func PrepareAndInstallSource added in v2026.1015.4

func PrepareAndInstallSource(stopBeforePrepare bool, prepare, deploy func() error, handoff func(func() error) error) error

PrepareAndInstallSource runs preparation inside the recoverable runtime handoff only when required.

func ProcessIdentityForTest

func ProcessIdentityForTest(pid int) string

func RegisterClient

func RegisterClient(ctx context.Context, kind string, args []string) (<-chan struct{}, func(), error)

RegisterClient provides a graceful stop handshake independent of OS signals. The coordinator verifies both the executable and process creation time.

func RunUpdateCommand

func RunUpdateCommand(args []string) bool

func SourceInstallNeedsStoppedPreparation added in v2026.1015.4

func SourceInstallNeedsStoppedPreparation(goos, gui string, state serverruntime.State, ready func() bool) bool

SourceInstallNeedsStoppedPreparation reports whether dependency repair must wait for runtime shutdown. Windows cannot unlink native npm modules loaded by the running Vite server.

func StopClientForTest

func StopClientForTest(executable string, pid int) error

func WaitProcessExitForTest

func WaitProcessExitForTest(ctx context.Context, pid int, identity string) error

Types

type DesktopProcessForTest

type DesktopProcessForTest struct {
	PID      int
	Identity string
}

func DesktopProcessesForTest

func DesktopProcessesForTest(executable string) ([]DesktopProcessForTest, error)

func UpdateClientsForTest

func UpdateClientsForTest(executable string) ([]DesktopProcessForTest, error)

type UpdateOpsForTest

type UpdateOpsForTest struct {
	Prepare func() (string, string, error)
	Stop    func(string) error
	Commit  func(string, string) error
	Start   func(string) error
	Restore func(string) error
	Quiesce func() error
}

UpdateOpsForTest lets the repository's top-level tests exercise recovery without touching any running application or external release.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL