updater

package
v0.7.18 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAndPrint

func CheckAndPrint(current string)

CheckAndPrint checks for updates and prints a message if available

func DownloadBinaryForCLI added in v0.7.0

func DownloadBinaryForCLI(version, binaryName, destPath string, opts *UpdateOptions) error

DownloadBinaryForCLI is an exported wrapper for CLI tools

func ExtractBinaryForCLI added in v0.7.0

func ExtractBinaryForCLI(archivePath, binaryName, destPath string) error

ExtractBinaryForCLI is an exported wrapper for CLI tools

func SelfUpdate

func SelfUpdate(current string) error

SelfUpdate performs an atomic update of the nextdeploy binary

func SelfUpdateDaemon added in v0.0.9

func SelfUpdateDaemon(current string) error

SelfUpdateDaemon performs an atomic update of the nextdeployd daemon

func SelfUpdateWithOptions added in v0.2.5

func SelfUpdateWithOptions(current string, opts *UpdateOptions) error

SelfUpdateWithOptions performs an update with custom options

Types

type Release

type Release struct {
	TagName string `json:"tag_name"`
	HTMLURL string `json:"html_url"`
}

func LatestRelease

func LatestRelease() (Release, error)

type UpdateError added in v0.2.5

type UpdateError struct {
	Stage       string
	Message     string
	Recoverable bool
	Err         error
}

func (*UpdateError) Error added in v0.2.5

func (e *UpdateError) Error() string

func (*UpdateError) Unwrap added in v0.2.5

func (e *UpdateError) Unwrap() error

type UpdateOptions added in v0.2.5

type UpdateOptions struct {
	Force       bool          // Force downgrade if current is newer
	Timeout     time.Duration // Overall update timeout
	VerifySSL   bool          // Verify SSL certificates
	SkipBackup  bool          // Skip backup creation
	SkipService bool          // Skip service restart
}

UpdateOptions configures the update process

func DefaultUpdateOptions added in v0.2.5

func DefaultUpdateOptions() *UpdateOptions

DefaultUpdateOptions returns sensible defaults

Jump to

Keyboard shortcuts

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