Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandRunner ¶
CommandRunner executes package-manager commands without shell interpolation.
type Coordinator ¶
type Coordinator struct {
// contains filtered or unexported fields
}
Coordinator chooses a safe update strategy for the detected installation source.
func NewCoordinator ¶
func NewCoordinator(options CoordinatorOptions) (*Coordinator, error)
NewCoordinator validates the dependencies shared by command and tests.
type CoordinatorOptions ¶
type CoordinatorOptions struct {
SourceDetector SourceDetector
ReleaseChecker ReleaseChecker
CommandRunner CommandRunner
ReleaseInstaller ReleaseInstaller
}
CoordinatorOptions provides external dependencies for a testable update flow.
type ReleaseChecker ¶
ReleaseChecker resolves the highest compatible published GitHub Release.
type ReleaseInstaller ¶
ReleaseInstaller installs an already verified release for the current platform.
type SourceDetector ¶
type SourceDetector interface {
Detect(buildinfo.Info) (model.InstallSource, error)
}
SourceDetector determines which installer owns the currently running binary.
type SourceDetectorFunc ¶
type SourceDetectorFunc func(buildinfo.Info) (model.InstallSource, error)
SourceDetectorFunc adapts a function for coordinator tests and composition.
func (SourceDetectorFunc) Detect ¶
func (f SourceDetectorFunc) Detect(info buildinfo.Info) (model.InstallSource, error)
Detect calls the wrapped source detector.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package archive verifies and installs platform release archives.
|
Package archive verifies and installs platform release archives. |
|
Package manifest 定义 v1 签名发布清单协议:发布清单、签名文件、规范 JSON 编码、Ed25519 签名与验签,以及客户端内置的公钥环。
|
Package manifest 定义 v1 签名发布清单协议:发布清单、签名文件、规范 JSON 编码、Ed25519 签名与验签,以及客户端内置的公钥环。 |
|
Package model 保存更新流程跨领域共享的数据模型。
|
Package model 保存更新流程跨领域共享的数据模型。 |
|
Package process 管理更新流程中的命令执行、候选二进制校验和平台替换。
|
Package process 管理更新流程中的命令执行、候选二进制校验和平台替换。 |
|
Package release reads and compares published GitHub releases.
|
Package release reads and compares published GitHub releases. |
|
Package source identifies the installation source before an update writes.
|
Package source identifies the installation source before an update writes. |