mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-27 20:19:31 +00:00
feature/clientupdate: move clientupdate to a modular feature, disabled for tsnet
Updates #12614 Change-Id: I5f685dec84a5396b7c2b66f2788ae3d286e1ddc6 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
69c79cb9f3
commit
038cdb4640
17
feature/hooks.go
Normal file
17
feature/hooks.go
Normal file
@@ -0,0 +1,17 @@
|
||||
// Copyright (c) Tailscale Inc & AUTHORS
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
package feature
|
||||
|
||||
// HookCanAutoUpdate is a hook for the clientupdate package
|
||||
// to conditionally initialize.
|
||||
var HookCanAutoUpdate Hook[func() bool]
|
||||
|
||||
// CanAutoUpdate reports whether the current binary is built with auto-update
|
||||
// support and, if so, whether the current platform supports it.
|
||||
func CanAutoUpdate() bool {
|
||||
if f, ok := HookCanAutoUpdate.GetOk(); ok {
|
||||
return f()
|
||||
}
|
||||
return false
|
||||
}
|
||||
Reference in New Issue
Block a user