Movatterモバイル変換


[0]ホーム

URL:


feature

package
v1.92.3Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License:BSD-3-ClauseImports:11Imported by:4

Details

Repository

github.com/tailscale/tailscale

Links

Documentation

Overview

Package feature tracks which features are linked into the binary.

Index

Constants

View Source
const CanSystemdStatus =runtime.GOOS == "linux" &&buildfeatures.HasSDNotify

CanSystemdStatus reports whether the current build has systemd notificationslinked in.

It's effectively the same as HookSystemdStatus.IsSet(), but a constant fordead code elimination reasons.

Variables

View Source
var ErrUnavailable =errors.New("feature not included in this build")

Functions

funcCanAutoUpdateadded inv1.90.0

func CanAutoUpdate()bool

CanAutoUpdate reports whether the current binary is built with auto-updatesupport and, if so, whether the current platform supports it.

funcHardwareAttestationAvailableadded inv1.90.0

func HardwareAttestationAvailable()bool

HardwareAttestationAvailable reports whether hardware attestation issupported and available (TPM on Windows/Linux, Secure Enclave on macOS|iOS,KeyStore on Android)

funcRegister

func Register(namestring)

Register notes that the named feature is linked into the binary.

funcRegisteredadded inv1.90.4

func Registered() map[string]bool

Registered reports the set of registered features.

The returned map should not be modified by the caller,not accessed concurrently with calls to Register.

funcSystemdStatusadded inv1.90.0

func SystemdStatus(formatstring, args ...any)

SystemdStatus sends a single line status update to systemd so thatinformation shows up in systemctl output.

It does nothing on non-Linux systems or if the binary was built withoutthe sdnotify feature.

funcTPMAvailableadded inv1.90.0

func TPMAvailable()bool

TPMAvailable reports whether a TPM device is supported and available.

Types

typeHook

type Hook[Funcany] struct {// contains filtered or unexported fields}

Hook is a func that can only be set once.

It is not safe for concurrent use.

var HookCanAutoUpdateHook[func()bool]

HookCanAutoUpdate is a hook for the clientupdate packageto conditionally initialize.

var HookGenerateAttestationKeyIfEmptyHook[func(p *persist.Persist, logflogger.Logf) (bool,error)]
var HookHardwareAttestationAvailableHook[func()bool]

HookHardwareAttestationAvailable is a hook that reports whether hardwareattestation is supported and available.

var HookProxyFromEnvironmentHook[func(*http.Request) (*url.URL,error)]

HookProxyFromEnvironment is a hook for feature/useproxy to registera function to use as http.ProxyFromEnvironment.

var HookProxyGetAuthHeaderHook[func(*url.URL) (string,error)]

HookProxyGetAuthHeader is a hook for feature/useproxy to register[tshttpproxy.GetAuthHeader].

var HookProxyInvalidateCacheHook[func()]

HookProxyInvalidateCache is a hook for feature/useproxy to register[tshttpproxy.InvalidateCache].

var HookProxySetSelfProxyHook[func(...string)]

HookProxySetSelfProxy is a hook for feature/useproxy to register[tshttpproxy.SetSelfProxy].

var HookProxySetTransportGetProxyConnectHeaderHook[func(*http.Transport)]

HookProxySetTransportGetProxyConnectHeader is a hook for feature/useproxy to register[tshttpproxy.SetTransportGetProxyConnectHeader].

var HookSystemdReadyHook[func()]

HookSystemdReady sends a readiness to systemd. This will unblock servicedependents from starting.

var HookSystemdStatusHook[func(formatstring, args ...any)]

HookSystemdStatus holds a func that will send a single line status update tosystemd so that information shows up in systemctl output.

var HookTPMAvailableHook[func()bool]

HookTPMAvailable is a hook that reports whether a TPM device is supportedand available.

func (*Hook[Func])Get

func (h *Hook[Func]) Get() Func

Get returns the hook function, or panics if it hasn't been set.Use IsSet to check if it's been set, or use GetOrNil if you'reokay with a nil return value.

func (*Hook[Func])GetOkadded inv1.84.0

func (h *Hook[Func]) GetOk() (f Func, okbool)

GetOk returns the hook function and true if it has been set,otherwise its zero value and false.

func (*Hook[Func])GetOrNiladded inv1.90.0

func (h *Hook[Func]) GetOrNil() Func

GetOrNil returns the hook function or nil if it hasn't been set.

func (*Hook[Func])IsSet

func (h *Hook[Func]) IsSet()bool

IsSet reports whether the hook has been set.

func (*Hook[Func])Set

func (h *Hook[Func]) Set(f Func)

Set sets the hook function, panicking if it's already been setor f is the zero value.

It's meant to be called in init.

func (*Hook[Func])SetForTestadded inv1.92.0

func (h *Hook[Func]) SetForTest(f Func) (restore func())

SetForTest sets the hook function for tests, blowingaway any previous value. It will panic if called fromnon-test code.

It returns a restore function that resets the hookto its previous value.

typeHooksadded inv1.84.0

type Hooks[Funcany] []Func

Hooks is a slice of funcs.

As opposed to a single Hook, this is meant to be used whenmultiple parties are able to install the same hook.

func (*Hooks[Func])Addadded inv1.84.0

func (h *Hooks[Func]) Add(f Func)

Add adds a hook to the list of hooks.

Add should only be called during early programstartup before Tailscale has started.It is not safe for concurrent use.

Source Files

View all Source files

Directories

PathSynopsis
Package ace registers support for Alternate Connectivity Endpoints (ACE).
Package ace registers support for Alternate Connectivity Endpoints (ACE).
Package appconnectors registers support for Tailscale App Connectors.
Package appconnectors registers support for Tailscale App Connectors.
The buildfeatures package contains boolean constants indicating which features were included in the binary (via build tags), for use in dead code elimination when using separate build tag protected files is impractical or undesirable.
The buildfeatures package contains boolean constants indicating which features were included in the binary (via build tags), for use in dead code elimination when using separate build tag protected files is impractical or undesirable.
Package c2n registers support for C2N (Control-to-Node) communications.
Package c2n registers support for C2N (Control-to-Node) communications.
Package capture formats packet logging into a debug pcap stream.
Package capture formats packet logging into a debug pcap stream.
dissector
Package dissector contains the Lua dissector for Tailscale packets.
Package dissector contains the Lua dissector for Tailscale packets.
Package clientupdate enables the client update feature.
Package clientupdate enables the client update feature.
condlite
expvar
Package expvar contains type aliases for expvar types, to allow conditionally excluding the package from builds.
Package expvar contains type aliases for expvar types, to allow conditionally excluding the package from builds.
The condregister package registers all conditional features guarded by build tags.
The condregister package registers all conditional features guarded by build tags.
identityfederation
Package identityfederation registers support for authkey resolution via identity federation if it's not disabled by the ts_omit_identityfederation build tag.
Package identityfederation registers support for authkey resolution via identity federation if it's not disabled by the ts_omit_identityfederation build tag.
oauthkey
Package oauthkey registers support for OAuth key resolution if it's not disabled via the ts_omit_oauthkey build tag.
Package oauthkey registers support for OAuth key resolution if it's not disabled via the ts_omit_oauthkey build tag.
portmapper
Package portmapper registers support for portmapper if it's not disabled via the ts_omit_portmapper build tag.
Package portmapper registers support for portmapper if it's not disabled via the ts_omit_portmapper build tag.
useproxy
Package useproxy registers support for using proxies if it's not disabled via the ts_omit_useproxy build tag.
Package useproxy registers support for using proxies if it's not disabled via the ts_omit_useproxy build tag.
Package debugportmapper registers support for debugging Tailscale's portmapping support.
Package debugportmapper registers support for debugging Tailscale's portmapping support.
The doctor package registers the "doctor" problem diagnosis support into the rest of Tailscale.
The doctor package registers the "doctor" problem diagnosis support into the rest of Tailscale.
Package drive registers the Taildrive (file server) feature.
Package drive registers the Taildrive (file server) feature.
The featuretags package is a registry of all the ts_omit-able build tags.
The featuretags package is a registry of all the ts_omit-able build tags.
Package identityfederation registers support for using ID tokens to automatically request authkeys for logging in.
Package identityfederation registers support for using ID tokens to automatically request authkeys for logging in.
Package linkspeed registers support for setting the TUN link speed on Linux, to better integrate with system monitoring tools.
Package linkspeed registers support for setting the TUN link speed on Linux, to better integrate with system monitoring tools.
Package linuxdnsfight provides Linux support for detecting DNS fights (inotify watching of /etc/resolv.conf).
Package linuxdnsfight provides Linux support for detecting DNS fights (inotify watching of /etc/resolv.conf).
Package oauthkey registers support for using OAuth client secrets to automatically request authkeys for logging in.
Package oauthkey registers support for using OAuth client secrets to automatically request authkeys for logging in.
Package portlist contains code to poll the local system for open ports and report them to the control plane, if enabled on the tailnet.
Package portlist contains code to poll the local system for open ports and report them to the control plane, if enabled on the tailnet.
Package portmapper registers support for NAT-PMP, PCP, and UPnP port mapping protocols to help get direction connections through NATs.
Package portmapper registers support for NAT-PMP, PCP, and UPnP port mapping protocols to help get direction connections through NATs.
Package posture registers support for device posture checking, reporting machine-specific information to the control plane when enabled by the user and tailnet.
Package posture registers support for device posture checking, reporting machine-specific information to the control plane when enabled by the user and tailnet.
Package relayserver registers the relay server feature and implements its associated ipnext.Extension.
Package relayserver registers the relay server feature and implements its associated ipnext.Extension.
Package sdnotify contains a minimal wrapper around systemd-notify to enable applications to signal readiness and status to systemd.
Package sdnotify contains a minimal wrapper around systemd-notify to enable applications to signal readiness and status to systemd.
Package syspolicy provides an interface for system-wide policy management.
Package syspolicy provides an interface for system-wide policy management.
Package taildrop registers the taildrop (file sending) feature.
Package taildrop registers the taildrop (file sending) feature.
Package tap registers Tailscale's experimental (demo) Linux TAP (Layer 2) support.
Package tap registers Tailscale's experimental (demo) Linux TAP (Layer 2) support.
Package tpm implements support for TPM 2.0 devices.
Package tpm implements support for TPM 2.0 devices.
Package useproxy registers support for using system proxies.
Package useproxy registers support for using system proxies.
Package wakeonlan registers the Wake-on-LAN feature.
Package wakeonlan registers the Wake-on-LAN feature.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp