global

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package global provides global configurations that can override others.

Index

Constants

View Source
const (
	LogLevelEnvVar                    = "GLOBAL_LOG_LEVEL"
	TLSCertEnvVar                     = "GLOBAL_TLS_CERT_FILE"
	TLSKeyEnvVar                      = "GLOBAL_TLS_KEY_FILE"
	TLACAEnvVar                       = "GLOBAL_TLS_CA_FILE"
	TLSClientCAEnvVar                 = "GLOBAL_TLS_CLIENT_CA_FILE"
	MTLSEnvVar                        = "GLOBAL_MTLS"
	VerifyChainOnlyEnvVar             = "GLOBAL_VERIFY_CHAIN_ONLY"
	InsecureEnvVar                    = "GLOBAL_INSECURE"
	NoIPv4EnvVar                      = "GLOBAL_NO_IPV4"
	NoIPv6EnvVar                      = "GLOBAL_NO_IPV6"
	PrimaryEndpointEnvVar             = "GLOBAL_PRIMARY_ENDPOINT"
	EndpointsEnvVar                   = "GLOBAL_ENDPOINTS"
	DetectEndpointsEnvVar             = "GLOBAL_DETECT_ENDPOINTS"
	DetectPrivateEndpointsEnvVar      = "GLOBAL_DETECT_PRIVATE_ENDPOINTS"
	AllowRemoteDetectionEnvVar        = "GLOBAL_ALLOW_REMOTE_DETECTION"
	DetectIPv6EnvVar                  = "GLOBAL_DETECT_IPV6"
	DisableFeatureAdvertisementEnvVar = "GLOBAL_DISABLE_FEATURE_ADVERTISEMENT"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// LogLevel is the log level.
	LogLevel string `yaml:"log-level,omitempty" json:"log-level,omitempty" toml:"log-level,omitempty" mapstructure:"log-level"`
	// TLSCertFile is the TLS certificate file.
	TLSCertFile string `yaml:"tls-cert-file,omitempty" json:"tls-cert-file,omitempty" toml:"tls-cert-file,omitempty" mapstructure:"tls-cert-file"`
	// TLSKeyFile is the TLS key file.
	TLSKeyFile string `yaml:"tls-key-file,omitempty" json:"tls-key-file,omitempty" toml:"tls-key-file,omitempty" mapstructure:"tls-key-file"`
	// TLACAFile is the TLS CA file.
	TLSCAFile string `yaml:"tls-ca-file,omitempty" json:"tls-ca-file,omitempty" toml:"tls-ca-file,omitempty" mapstructure:"tls-ca-file"`
	// TLSClientCAFile is the path to the TLS client CA file.
	// If empty, either TLSCAFile or the system CA pool is used.
	TLSClientCAFile string `` /* 141-byte string literal not displayed */
	// MTLS is true if mutual TLS is enabled.
	MTLS bool `yaml:"mtls,omitempty" json:"mtls,omitempty" toml:"mtls,omitempty" mapstructure:"mtls"`
	// VerifyChainOnly is true if only the chain should be verified.
	VerifyChainOnly bool `` /* 137-byte string literal not displayed */
	// Insecure is true if TLS should be disabled.
	Insecure bool `yaml:"insecure,omitempty" json:"insecure,omitempty" toml:"insecure,omitempty" mapstructure:"insecure"`
	// NoIPv4 is true if IPv4 should be disabled.
	NoIPv4 bool `yaml:"no-ipv4,omitempty" json:"no-ipv4,omitempty" toml:"no-ipv4,omitempty" mapstructure:"no-ipv4"`
	// NoIPv6 is true if IPv6 should be disabled.
	NoIPv6 bool `yaml:"no-ipv6,omitempty" json:"no-ipv6,omitempty" toml:"no-ipv6,omitempty" mapstructure:"no-ipv6"`
	// PrimaryEndpoint is the preferred publicly routable address of this node.
	// Setting this value will override the store advertise address with its
	// configured listen port.
	PrimaryEndpoint string `yaml:"primary-endpoint,omitempty" json:"endpoint,omitempty" toml:"endpoint,omitempty" mapstructure:"endpoint"`
	// Endpoints are the additional publicly routable addresses of this node.
	// If PrimaryEndpoint is not set, it will be set to the first endpoint.
	// Setting this value will override the store advertise with its configured
	// listen port.
	Endpoints []string `yaml:"endpoints,omitempty" json:"endpoints,omitempty" toml:"endpoints,omitempty" mapstructure:"endpoints"`
	// DetectEndpoints is true if the endpoints should be detected.
	DetectEndpoints bool `` /* 133-byte string literal not displayed */
	// DetectPrivateEndpoints is true if private IP addresses should be included in detection.
	// This automatically enables DetectEndpoints.
	DetectPrivateEndpoints bool `` /* 165-byte string literal not displayed */
	// AllowRemoteDetection is true if remote detection is allowed.
	AllowRemoteDetection bool `` /* 157-byte string literal not displayed */
	// DetectIPv6 is true if IPv6 addresses should be included in detection.
	DetectIPv6 bool `yaml:"detect-ipv6,omitempty" json:"detect-ipv6,omitempty" toml:"detect-ipv6,omitempty" mapstructure:"detect-ipv6"`
	// DisableFeatureAdvertisement is true if feature advertisement should be disabled.
	DisableFeatureAdvertisement bool `` /* 185-byte string literal not displayed */
}

Options are the global options.

func NewOptions

func NewOptions() *Options

NewOptions creates new options.

func (*Options) BindFlags

func (o *Options) BindFlags(fs *flag.FlagSet)

func (*Options) DeepCopy added in v0.1.13

func (o *Options) DeepCopy() *Options

DeepCopy copies the options.

func (*Options) Overlay

func (o *Options) Overlay(opts ...any) error

Overlay overlays the global options onto the given option sets.

Jump to

Keyboard shortcuts

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