Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Launch ¶
Launch writes a self-deleting helper script to /tmp and starts it. The caller should then initiate its own graceful shutdown (e.g. set quitting=true and return tea.Quit).
The helper script waits for the current process (PID) to fully exit before launching the new one.
func ResolveBinary ¶
ResolveBinary returns the path to the ggcode binary that should be used for restart. It resolves symlinks so npm/python wrappers point to the latest installed version.
Types ¶
type Request ¶
type Request struct {
// Binary is the path to the ggcode binary to launch.
Binary string
// Args are the CLI arguments for the new process (e.g. --resume, --config).
Args []string
// WorkDir is the working directory for the new process.
WorkDir string
// PID is the current process PID (the script waits for it to exit).
PID int
}
Request contains all info needed to re-launch after exit.
Click to show internal directories.
Click to hide internal directories.