updater

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2025 License: MIT Imports: 17 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGitHubClientWrapper

func NewGitHubClientWrapper(client *github.Client) release.GitHubClientInterface

NewGitHubClientWrapper creates a new wrapper around the GitHub client

Types

type UpdateCacheItem

type UpdateCacheItem struct {
	Updates   []string
	CheckedAt time.Time
}

type Updater

type Updater struct {
	CurrentVersion string
	// contains filtered or unexported fields
}

Updater handles the update process for the application

func New

func New(cfg *config.Config, currentVersion string, k8sClient *k8s.KubeClient, redisClient *redis.Client) *Updater

New creates a new updater instance

func (*Updater) CheckDeploymentsReady

func (self *Updater) CheckDeploymentsReady(ctx context.Context, version string) (bool, error)

CheckDeploymentsReady checks if all deployments are running with the specified version

func (*Updater) CheckForUpdates

func (self *Updater) CheckForUpdates(ctx context.Context) ([]string, error)

CheckForUpdates checks if there are any available updates

func (*Updater) GetLatestVersion

func (self *Updater) GetLatestVersion(ctx context.Context) (string, error)

GetLatestVersion returns the latest available version

func (*Updater) GetNextAvailableVersion

func (self *Updater) GetNextAvailableVersion(ctx context.Context, currentVersion string) (string, error)

GetNextAvailableVersion returns the next version that can be updated to from the current version

func (*Updater) GetUpdatePath

func (self *Updater) GetUpdatePath(ctx context.Context, targetVersion string) ([]string, error)

GetUpdatePath returns the ordered list of versions needed to update from current to target

func (*Updater) UpdateToVersion

func (self *Updater) UpdateToVersion(ctx context.Context, targetVersion string) error

UpdateToVersion updates the application to the specified version

Jump to

Keyboard shortcuts

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