Documentation
¶
Overview ¶
Package clientupdate implements tailscale client update for all supported platforms. This package can be used from both tailscaled and tailscale binaries.
Index ¶
Constants ¶
View Source
const ( CurrentTrack = "" StableTrack = "stable" UnstableTrack = "unstable" )
Variables ¶
This section is empty.
Functions ¶
func LatestTailscaleVersion ¶
LatestTailscaleVersion returns the latest released version for the given track from pkgs.tailscale.com.
func Update ¶
func Update(args UpdateArgs) error
Update runs a single update attempt using the platform-specific mechanism.
On Windows, this copies the calling binary and re-executes it to apply the update. The calling binary should handle an "update" subcommand and call this function again for the re-executed binary to proceed.
Types ¶
type UpdateArgs ¶
type UpdateArgs struct {
// Version can be a specific version number or one of the predefined track
// constants:
//
// - CurrentTrack will use the latest version from the same track as the
// running binary
// - StableTrack and UnstableTrack will use the latest versions of the
// corresponding tracks
//
// Leaving this empty is the same as using CurrentTrack.
Version string
// AppStore forces a local app store check, even if the current binary was
// not installed via an app store.
AppStore bool
// Logf is a logger for update progress messages.
Logf logger.Logf
// Confirm is called when a new version is available and should return true
// if this new version should be installed. When Confirm returns false, the
// update is aborted.
Confirm func(newVer string) bool
}
UpdateArgs contains arguments needed to run an update.
Click to show internal directories.
Click to hide internal directories.