Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultManifestURL = "https://cloudcache.volccdn.com/ve/proxycli/manifest.json" EnvProxyPath = "VOLCENGINE_CLI_PROXY_PATH" StateFileName = "install-state.json" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InstalledTool ¶
type Manager ¶
type Manager struct {
HomeDir string
ConfigDir string
BinDir string
ManifestURL string
FallbackManifest []byte
HTTPClient *http.Client
CheckHTTPClient *http.Client
LookPath func(string) (string, error)
GOOS string
GOARCH string
Now func() time.Time
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) PrepareUpdateCheck ¶
func (m *Manager) PrepareUpdateCheck(resolution Resolution) UpdateCheckPlan
PrepareUpdateCheck performs only local work before process delegation. A stale cache is synchronously marked with a failure-backoff lease so an exec of a short-lived child cannot cause every invocation to launch another CDN request. The caller starts an independent helper when Refresh is true.
func (*Manager) RefreshUpdateCheck ¶
RefreshUpdateCheck is run by the detached helper. It performs the remote probe and replaces the synchronous lease with a success or failure cache entry while preserving the daily notice throttle.
type Manifest ¶
type Manifest struct {
Tools map[Tool]ManifestTool `json:"tools"`
}
type ManifestAsset ¶
type ManifestTool ¶
type ManifestTool struct {
Version string `json:"version"`
Platforms map[string]ManifestAsset `json:"platforms"`
}
type State ¶
type State struct {
Tools map[Tool]*InstalledTool `json:"tools"`
}
type UpdateCheckPlan ¶
type UpdateCheckPlan struct {
Refresh bool
HasNotice bool
Notice UpdateCheckResult
}
type UpdateCheckResult ¶
type UpgradeItem ¶
type UpgradeResult ¶
type UpgradeResult struct {
Items []UpgradeItem
}
Click to show internal directories.
Click to hide internal directories.