update

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package update retrieves and installs kardbrd releases.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Client           *http.Client
	LatestReleaseURL string
	ExecutablePath   func() (string, error)
	GOOS             string
	GOARCH           string
}

Config contains the updater's external dependencies. The fields exist so callers can test updates without contacting GitHub or replacing themselves.

type Result

type Result struct {
	Tag        string
	Executable string
}

Result describes a successfully installed release.

type Updater

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

Updater downloads and atomically installs a compatible kardbrd release.

func New

func New(config Config) *Updater

New constructs an updater with production defaults for omitted dependencies.

func (*Updater) Update

func (u *Updater) Update(ctx context.Context) (Result, error)

Update retrieves, verifies, and atomically installs the latest matching release.

Jump to

Keyboard shortcuts

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