mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-26 10:39:19 +00:00
ipn/{ipnlocal,ipnstate,localapi}: add localapi endpoints for client self-update (#10188)
* ipn/{ipnlocal,ipnstate,localapi}: add localapi endpoints for client self-update
Updates #10187.
Signed-off-by: Naman Sood <mail@nsood.in>
* depaware
Updates #10187.
Signed-off-by: Naman Sood <mail@nsood.in>
* address review feedback
Signed-off-by: Naman Sood <mail@nsood.in>
---------
Signed-off-by: Naman Sood <mail@nsood.in>
This commit is contained in:
@@ -22,6 +22,7 @@ import (
|
||||
"tailscale.com/types/ptr"
|
||||
"tailscale.com/types/views"
|
||||
"tailscale.com/util/dnsname"
|
||||
"tailscale.com/version"
|
||||
)
|
||||
|
||||
//go:generate go run tailscale.com/cmd/cloner -clonefunc=false -type=TKAFilteredPeer
|
||||
@@ -710,3 +711,25 @@ type DebugDERPRegionReport struct {
|
||||
Warnings []string
|
||||
Errors []string
|
||||
}
|
||||
|
||||
type SelfUpdateStatus string
|
||||
|
||||
const (
|
||||
UpdateFinished SelfUpdateStatus = "UpdateFinished"
|
||||
UpdateInProgress SelfUpdateStatus = "UpdateInProgress"
|
||||
UpdateFailed SelfUpdateStatus = "UpdateFailed"
|
||||
)
|
||||
|
||||
type UpdateProgress struct {
|
||||
Status SelfUpdateStatus `json:"status,omitempty"`
|
||||
Message string `json:"message,omitempty"`
|
||||
Version string `json:"version,omitempty"`
|
||||
}
|
||||
|
||||
func NewUpdateProgress(ps SelfUpdateStatus, msg string) UpdateProgress {
|
||||
return UpdateProgress{
|
||||
Status: ps,
|
||||
Message: msg,
|
||||
Version: version.Short(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user