Documentation
¶
Overview ¶
Package installation manages per-user node configuration and background startup.
Index ¶
- func API(cfg node.Config) string
- func ApplyStartupChange(ctx context.Context, config, dataDir, id string) error
- func BinPath() (string, error)
- func CheckHybridSystem(ctx context.Context, binary, config, mode string) error
- func CheckHybridUser() error
- func CheckLocalAPI(ctx context.Context, cfg node.Config, id *identity.Identity) error
- func CheckServiceMode(mode string) error
- func CheckServiceProfile(config, mode string) error
- func CheckUserStartup(ctx context.Context, mode string) error
- func ConfigPath() string
- func FinishRetiredHelper(id string)
- func Home() string
- func InstallAgent(ctx context.Context, agent, project, binary, config string, mcp, skill bool) error
- func InstallSelf(ctx context.Context) (string, error)
- func InstallSystemSelf(ctx context.Context) (string, error)
- func PrepareStartupChange(ctx context.Context, config, id, mode string) error
- func ReadConfig(path string) (node.Config, error)
- func RefreshLegacyUnixStartup(ctx context.Context, profile UpdateStartup, directory string, ...) error
- func RemoveRetiredHelper(config string)
- func SaveAdmin(p AdminProfile) error
- func SaveUpdateAdmin(p AdminProfile) error
- func ScheduleRetiredUninstall(config, id string) error
- func Service(ctx context.Context, operation, binary, config, mode string) error
- func ServiceMode(config, mode string) (string, error)
- func StartTunnelService(ctx context.Context, binary, dir string) error
- func UninstallRetired(ctx context.Context, config, dataDir, id string) error
- func UserStartupWarning() string
- func ValidateServiceMode(mode string) error
- func WindowsRuntimePath(dir string) string
- type AdminProfile
- type AgentPaths
- type UpdateResult
- type UpdateStartup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyStartupChange ¶ added in v0.5.0
ApplyStartupChange runs only in the detached helper after the old runtime exits. It validates the profile again and retains all identity and work files.
func CheckHybridSystem ¶ added in v0.5.0
CheckHybridSystem verifies the privileged install's ownership and startup context before consuming an invitation or registering a privileged service.
func CheckHybridUser ¶ added in v0.5.7
func CheckHybridUser() error
func CheckLocalAPI ¶ added in v0.5.7
CheckLocalAPI reports a local API port held by something other than this profile's own node. It allows a brief wait for a node that is still stopping.
func CheckServiceMode ¶
func CheckServiceProfile ¶
CheckServiceProfile validates installation privileges before credentials are issued or an invitation is redeemed, including system-to-user migration.
func CheckUserStartup ¶ added in v0.5.7
CheckUserStartup verifies the login-session service manager that User startup depends on. Other modes have no such dependency or fall back to a process.
func ConfigPath ¶
func ConfigPath() string
func FinishRetiredHelper ¶
func FinishRetiredHelper(id string)
FinishRetiredHelper releases a one-shot service-manager registration after the helper has written its result. Linux transient units collect themselves.
func InstallAgent ¶
func InstallSystemSelf ¶ added in v0.5.0
InstallSystemSelf installs a private service executable without adding its administrator-only directory to the interactive user's PATH.
func PrepareStartupChange ¶ added in v0.5.0
PrepareStartupChange never prompts for elevation. Only Windows supports an identity-preserving System migration. Hybrid and Unix need local installers.
func RefreshLegacyUnixStartup ¶ added in v0.8.4
func RefreshLegacyUnixStartup(ctx context.Context, profile UpdateStartup, directory string, selected update.RuntimeBinary) error
RefreshLegacyUnixStartup runs before the new child opens work admission. The old parent cannot exec at its child's request, but its original service manager can restart a refreshed entry point after propagating a deliberate child failure. Keep the job, its account, installation identity, and persisted selection intact.
func RemoveRetiredHelper ¶ added in v0.5.7
func RemoveRetiredHelper(config string)
RemoveRetiredHelper deletes the running uninstall helper of a retired Hybrid companion after cleanup succeeds. Other profiles reuse their state directory, and retry cleanup with the same helper if it fails.
func SaveAdmin ¶
func SaveAdmin(p AdminProfile) error
func SaveUpdateAdmin ¶
func SaveUpdateAdmin(p AdminProfile) error
func ScheduleRetiredUninstall ¶
ScheduleRetiredUninstall starts an independent cleanup process. It must outlive the node runtime, including its service-manager process group. Unmanaged node processes have no installation to remove.
func ServiceMode ¶
ServiceMode resolves the saved startup selection without changing the profile.
func StartTunnelService ¶
StartTunnelService installs a separate user startup entry, never a fleet node.
func UninstallRetired ¶
UninstallRetired removes only an installation whose identity has a durable unregistration policy. The installation lock serializes cleanup with enrollment; the runtime and node locks ensure work has stopped before deleting the launcher.
func UserStartupWarning ¶ added in v0.5.7
func UserStartupWarning() string
func ValidateServiceMode ¶
ValidateServiceMode rejects unknown startup modes on every platform.
func WindowsRuntimePath ¶
WindowsRuntimePath is the stable executable path covered by the node's firewall rules. Installation and temporary updaters publish copies between runs.
Types ¶
type AdminProfile ¶
func ReadAdmin ¶
func ReadAdmin() (AdminProfile, error)
func ReadUpdateAdmin ¶
func ReadUpdateAdmin() (AdminProfile, error)
type AgentPaths ¶
func AgentLocations ¶
func AgentLocations(agent, home, project string) (AgentPaths, error)
type UpdateResult ¶
func UpdateSelf ¶
func UpdateSelf(ctx context.Context, repository, version string) (UpdateResult, error)
UpdateSelf replaces the invoked CLI, independently of gateway-managed services.
type UpdateStartup ¶ added in v0.8.4
type UpdateStartup struct{ Config, Binary, Mode, ID string }
UpdateStartup binds an update migration to one remembered installation.
func ReadUpdateStartup ¶ added in v0.8.4
func ReadUpdateStartup(config, directory string) (UpdateStartup, error)
Source Files
¶
- agents.go
- files.go
- firewall.go
- firewall_other.go
- hybrid_unix.go
- profile.go
- retirement.go
- retirement_linux.go
- retirement_unix.go
- service.go
- service_linux.go
- service_unix.go
- startup_change.go
- tunnels.go
- tunnels_linux.go
- update.go
- update_legacy_linux.go
- update_legacy_unix.go
- update_startup.go
- update_systemd_dropins_linux.go
- update_unix.go
- user_launcher.go
- user_startup.go