setup

package
v0.4.23 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const CurrentVersion = "1.2.1"

CurrentVersion is the latest setup version

View Source
const VersionFile = "/etc/tako/version.json"

VersionFile is the location of the version manifest on servers

Variables

View Source
var ErrNotSetup = fmt.Errorf("server not set up")

ErrNotSetup indicates server is not set up

Functions

func WriteVersionFile

func WriteVersionFile(client *ssh.Client, version *ServerVersion) error

WriteVersionFile writes the version manifest to the server

Types

type ServerVersion

type ServerVersion struct {
	Version        string            `json:"version"`
	InstalledAt    time.Time         `json:"installed_at"`
	LastUpgrade    time.Time         `json:"last_upgrade,omitempty"`
	Components     map[string]string `json:"components"`
	Features       []string          `json:"features"`
	TakoCLIVersion string            `json:"tako_cli_version"`
}

ServerVersion represents the installed setup version on a server

func DetectServerVersion

func DetectServerVersion(client *ssh.Client) (*ServerVersion, error)

DetectServerVersion detects the setup version installed on a server

func (*ServerVersion) IsOutdated

func (v *ServerVersion) IsOutdated() bool

IsOutdated checks if version is more than one major version behind

func (*ServerVersion) IsUpgradeAvailable

func (v *ServerVersion) IsUpgradeAvailable() bool

IsUpgradeAvailable checks if an upgrade is available

func (*ServerVersion) NeedsUpgrade

func (v *ServerVersion) NeedsUpgrade() bool

NeedsUpgrade checks if upgrade is recommended

Jump to

Keyboard shortcuts

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