Documentation ¶
Overview ¶
Package envknob provides access to environment-variable tweakable debug settings.
These are primarily knobs used by Tailscale developers during development or by users when instructed to by Tailscale developers when debugging something. They are not a stable interface and may be removed or any time.
A related package, control/controlknobs, are knobs that can be changed at runtime by the control plane. Sometimes both are used: an envknob for the default/explicit value, else falling back to the controlknob value.
Index ¶
- func Bool(envVar string) bool
- func BoolDefaultTrue(envVar string) bool
- func CanSSHD() bool
- func LogCurrent(logf logf)
- func LookupBool(envVar string) (v bool, ok bool)
- func LookupInt(envVar string) (v int, ok bool)
- func OptBool(envVar string) opt.Bool
- func SSHIgnoreTailnetPolicy() bool
- func SSHPolicyFile() string
- func String(envVar string) string
- func UseWIPCode() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bool ¶
Bool returns the boolean value of the named environment variable. If the variable is not set, it returns false. An invalid value exits the binary with a failure.
func BoolDefaultTrue ¶
BoolDefaultTrue is like Bool, but returns true by default if the environment variable isn't present.
func CanSSHD ¶
func CanSSHD() bool
CanSSHD is whether the Tailscale SSH server is allowed to run.
If disabled, the SSH server won't start (won't intercept port 22) if already enabled and any attempt to re-enable it will result in an error.
func LookupBool ¶
LookupBool returns the boolean value of the named environment value. The ok result is whether a value was set. If the value isn't a valid int, it exits the program with a failure.
func LookupInt ¶
LookupInt returns the integer value of the named environment value. The ok result is whether a value was set. If the value isn't a valid int, it exits the program with a failure.
func OptBool ¶
OptBool is like Bool, but returns an opt.Bool, so the caller can distinguish between implicitly and explicitly false.
func SSHIgnoreTailnetPolicy ¶
func SSHIgnoreTailnetPolicy() bool
SSHIgnoreTailnetPolicy is whether to ignore the Tailnet SSH policy for development.
func SSHPolicyFile ¶
func SSHPolicyFile() string
SSHPolicyFile returns the path, if any, to the SSHPolicy JSON file for development.
func String ¶
String returns the named environment variable, using os.Getenv.
If the variable is non-empty, it's also tracked & logged as being an in-use knob.
func UseWIPCode ¶
func UseWIPCode() bool
UseWIPCode is whether TAILSCALE_USE_WIP_CODE is set to permit use of Work-In-Progress code.
Types ¶
This section is empty.