Documentation
¶
Index ¶
- Constants
- func ChannelLabel(ch Channel, detail string) string
- func LaunchHandoff(action *HandoffAction) error
- func PathHealthLabel(ph PathHealth) string
- func RunHandoffFromFile(path string) error
- type ApplyMode
- type ApplyResult
- type AssetInfo
- type Channel
- type CheckResult
- type HandoffAction
- type HandoffActionType
- type PathHealth
Constants ¶
View Source
const HandoffArg = "--update-handoff"
Variables ¶
This section is empty.
Functions ¶
func ChannelLabel ¶
func LaunchHandoff ¶
func LaunchHandoff(action *HandoffAction) error
func PathHealthLabel ¶
func PathHealthLabel(ph PathHealth) string
func RunHandoffFromFile ¶
Types ¶
type ApplyResult ¶
type ApplyResult struct {
Success bool
Message string
NeedsRelaunch bool
Handoff *HandoffAction
RelaunchPath string
RelaunchArgs []string
}
func Apply ¶
func Apply(ctx context.Context, check CheckResult, currentExe string) (ApplyResult, error)
type CheckResult ¶
type CheckResult struct {
CheckedAt time.Time
ETag string
CurrentVersion string
LatestVersion string
LatestTag string
ReleaseURL string
UpdateAvailable bool
Channel Channel
ChannelDetail string
PathHealth PathHealth
ApplyMode ApplyMode
ApplyCommand []string
Guidance []string
Asset AssetInfo
Checksums AssetInfo
InstallerExe string
}
type HandoffAction ¶
type HandoffAction struct {
Type HandoffActionType `json:"type"`
ParentPID int `json:"parent_pid"`
InstallerPath string `json:"installer_path,omitempty"`
InstallerArgs []string `json:"installer_args,omitempty"`
NewBinaryPath string `json:"new_binary_path,omitempty"`
TargetBinaryPath string `json:"target_binary_path,omitempty"`
RelaunchPath string `json:"relaunch_path"`
RelaunchArgs []string `json:"relaunch_args,omitempty"`
CleanupDir string `json:"cleanup_dir,omitempty"`
}
type HandoffActionType ¶
type HandoffActionType string
const ( HandoffInstaller HandoffActionType = "installer" HandoffReplace HandoffActionType = "replace" )
type PathHealth ¶
type PathHealth struct {
Healthy bool
ResolvedPath string
DesiredPath string
Message string
Conflicts []string
}
func FixPathConflicts ¶
func FixPathConflicts(ctx context.Context, desiredExe string) (PathHealth, error)
Click to show internal directories.
Click to hide internal directories.