remote

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchLatestVersion added in v0.8.0

func FetchLatestVersion() (string, error)

FetchLatestVersion queries GitHub API for the latest release tag.

func RemoveHostKeys added in v0.5.1

func RemoveHostKeys(server *config.ServerConfig) error

RemoveHostKeys removes all known_hosts entries for a server's address.

func Run

func Run(server *config.ServerConfig, args ...string) ([]byte, error)

Run executes a homebutler command on a remote server via SSH. It expects homebutler to be installed on the remote host.

func TrustServer added in v0.5.1

func TrustServer(server *config.ServerConfig, confirm func(fingerprint string) bool) error

TrustServer connects to a server, displays its host key fingerprint, and adds it to known_hosts if the user confirms.

func ValidateLocalArch

func ValidateLocalArch(remoteOS, remoteArch string) error

DeployLocal validates architecture match when deploying current binary without --local flag.

Types

type DeployResult

type DeployResult struct {
	Server  string `json:"server"`
	Arch    string `json:"arch"`
	Source  string `json:"source"` // "github" or "local"
	Status  string `json:"status"` // "ok" or "error"
	Message string `json:"message,omitempty"`
}

DeployResult holds the result of a deploy operation.

func Deploy

func Deploy(server *config.ServerConfig, localBin string) (*DeployResult, error)

Deploy installs homebutler on a remote server. If localBin is set, it copies that file directly (air-gapped mode). Otherwise, it downloads the correct binary from GitHub Releases.

type UpgradeReport added in v0.8.0

type UpgradeReport struct {
	LatestVersion string          `json:"latest_version"`
	Results       []UpgradeResult `json:"results"`
}

UpgradeReport is the overall upgrade result.

type UpgradeResult added in v0.8.0

type UpgradeResult struct {
	Target      string `json:"target"`
	PrevVersion string `json:"prev_version"`
	NewVersion  string `json:"new_version"`
	Status      string `json:"status"` // "upgraded", "up-to-date", "error"
	Message     string `json:"message,omitempty"`
}

UpgradeResult holds the result of an upgrade operation for a single target.

func RemoteUpgrade added in v0.8.0

func RemoteUpgrade(server *config.ServerConfig, latestVersion string) *UpgradeResult

RemoteUpgrade upgrades homebutler on a remote server.

func SelfUpgrade added in v0.8.0

func SelfUpgrade(currentVersion, latestVersion string) *UpgradeResult

SelfUpgrade replaces the current binary with the latest version.

Jump to

Keyboard shortcuts

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