envknob

package
v0.0.0-...-d406eaa Latest Latest
Warning

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

Go to latest
Published: May 21, 2023 License: BSD-3-Clause Imports: 1 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterBool

func RegisterBool(envVar string) func() bool

RegisterBool returns a func that gets the named environment variable, without a map lookup per call. It assumes that mutations happen via envknob.Setenv.

func String

func String(envVar string) 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.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL