package envconfig

Import Path
	google.golang.org/grpc/internal/envconfig (on go.dev)

Dependency Relation
	imports 3 packages, and imported by 7 packages

Involved Source Files Package envconfig contains grpc settings configured by environment variables. observability.go xds.go
Package-Level Type Names (only one, which is exported)
/* sort exporteds by: | */
GoroutineLabels is a bitfield indicating which goroutine labels are enabled. const AllGoroutineLabels const GoroutineLabelServerMethod var LabelServerGoroutines
Package-Level Functions (total 3, none are exported)
Package-Level Variables (total 31, all are exported)
ALTSHandshakerKeepaliveParams is set if we should add the KeepaliveParams when dial the ALTS handshaker service.
ALTSMaxConcurrentHandshakes is the maximum number of concurrent ALTS handshakes that can be performed.
C2PResolverTestOnlyTrafficDirectorURI is the TD URI for testing.
CaseSensitiveBalancerRegistries is set if the balancer registry should be case-sensitive. This is enabled by default, but can be disabled by setting the env variable "GRPC_GO_EXPERIMENTAL_CASE_SENSITIVE_BALANCER_REGISTRIES" to "false". This env varible will be removed in release v1.82.0.
Enable8KBDefaultHeaderListSize indicates that default maximum header list size is restricted to 8KB. This is disabled by default, but can be enabled by setting the environment variable "GRPC_GO_EXPERIMENTAL_ENABLE_8KB_DEFAULT_HEADER_LIST_SIZE" to "true". When disabled, the default maximum header list size of 16MB is used. When enabled, RPCs with a total size of headers exceeding 8KB will fail unless explicitly configured otherwise by the user. TODO: In release v1.82.0, env var will be enabled by default.
EnableDefaultPortForProxyTarget controls whether the resolver adds a default port 443 to a target address that lacks one. This flag only has an effect when all of the following conditions are met: - A connect proxy is being used. - Target resolution is disabled. - The DNS resolver is being used.
EnableHTTPFramerReadBufferPooling enables the use of the readyreader.Reader interface to perform non-memory-pinning reads, provided the underlying net.Conn supports it. This reduces memory usage when subchannels are idle. This environment variable serves as an escape hatch to disable the feature if unforeseen issues arise, and it will be removed in a future release.
EnablePriorityLBChildPolicyCache controls whether the priority balancer should cache child balancers that are removed from the LB policy config, for a period of 15 minutes. This is disabled by default, but can be enabled by setting the env variable GRPC_EXPERIMENTAL_ENABLE_PRIORITY_LB_CHILD_POLICY_CACHE to true.
EnableTXTServiceConfig is set if the DNS resolver should perform TXT lookups for service config ("GRPC_ENABLE_TXT_SERVICE_CONFIG" is not "false").
EnforceALPNEnabled is set if TLS connections to servers with ALPN disabled should be rejected. The HTTP/2 protocol requires ALPN to be enabled, this option is present for backward compatibility. This option may be overridden by setting the environment variable "GRPC_ENFORCE_ALPN_ENABLED" to "true" or "false".
GCPAuthenticationFilterEnabled enables the xDS GCP Authentication filter. For more details, see: https://github.com/grpc/proposal/blob/master/A83-xds-gcp-authn-filter.md
LabelServerGoroutines controls setting [runtime/pprof.Labels] on the goroutines spawned by [grpc.Server] type. For now, this is limited to the goroutines spawned to handle incoming requests on the server. Set "GRPC_GO_SERVER_GOROUTINE_LABELS" to "grpc.method=true" to enable this grpc.method label, or "all" to enable all valid labels. This variable is a bit-field.
ObservabilityConfig is the json configuration for the gcp/observability package specified directly in the envObservabilityConfig env var. This is used in the 1.0 release of gcp/observability, and thus must not be deleted or changed.
ObservabilityConfigFile is the json configuration for the gcp/observability specified in a file with the location specified in envObservabilityConfigFile env var. This is used in the 1.0 release of gcp/observability, and thus must not be deleted or changed.
PickFirstWeightedShuffling indicates whether weighted endpoint shuffling is enabled in the pick_first LB policy, as defined in gRFC A113. This feature can be disabled by setting the environment variable GRPC_EXPERIMENTAL_PF_WEIGHTED_SHUFFLING to "false".
RingHashCap indicates the maximum ring size which defaults to 4096 entries but may be overridden by setting the environment variable "GRPC_RING_HASH_CAP". This does not override the default bounds checking which NACKs configs specifying ring sizes > 8*1024*1024 (~8M).
RingHashSetRequestHashKey is set if the ring hash balancer can get the request hash header by setting the "requestHashHeader" field, according to gRFC A76. It can be disabled by setting the environment variable "GRPC_EXPERIMENTAL_RING_HASH_SET_REQUEST_HASH_KEY" to "false".
TXTErrIgnore is set if TXT errors should be ignored ("GRPC_GO_IGNORE_TXT_ERRORS" is not "false").
XDSAuthorityRewrite indicates whether xDS authority rewriting is enabled. This feature is defined in gRFC A81 and is enabled by setting the environment variable GRPC_EXPERIMENTAL_XDS_AUTHORITY_REWRITE to "true".
XDSBootstrapCallCredsEnabled controls if call credentials can be used in xDS bootstrap configuration via the `call_creds` field. For more details, see: https://github.com/grpc/proposal/blob/master/A97-xds-jwt-call-creds.md
XDSBootstrapFileContent holds the content of the xDS bootstrap configuration. Users can specify the bootstrap config by setting the environment variable "GRPC_XDS_BOOTSTRAP_CONFIG". When both bootstrap FileName and FileContent are set, FileName is used.
XDSBootstrapFileName holds the name of the file which contains xDS bootstrap configuration. Users can specify the location of the bootstrap file by setting the environment variable "GRPC_XDS_BOOTSTRAP". When both bootstrap FileName and FileContent are set, FileName is used.
XDSClientExtProcEnabled indicates whether ExtProc filter is enabled on the client side. For more details, see: https://github.com/grpc/proposal/blob/master/A93-xds-ext-proc.md
XDSDualstackEndpointsEnabled is true if gRPC should read the "additional addresses" in the xDS endpoint resource.
XDSEndpointHashKeyBackwardCompat controls the parsing of the endpoint hash key from EDS LbEndpoint metadata. Endpoint hash keys can be disabled by setting "GRPC_XDS_ENDPOINT_HASH_KEY_BACKWARD_COMPAT" to "true". A future release will remove this environment variable, enabling the new behavior unconditionally.
XDSHTTPConnectEnabled is true if gRPC should parse custom Metadata configuring use of an HTTP CONNECT proxy via xDS from cluster resources. For more details, see: https://github.com/grpc/proposal/blob/master/A86-xds-http-connect.md
XDSORCAToLRSPropEnabled controls whether ORCA metrics are explicitly filtered and prefix-propagated to the LRS server. For more details, see: https://github.com/grpc/proposal/blob/master/A85-lrs-custom-metrics-changes.md
XDSRecoverPanicInResourceParsing indicates whether the xdsclient should recover from panics while parsing xDS resources. This feature can be disabled (e.g. for fuzz testing) by setting the environment variable "GRPC_GO_EXPERIMENTAL_XDS_RESOURCE_PANIC_RECOVERY" to "false".
XDSSNIEnabled controls if gRPC should send SNI information in xDS configured TLS handshakes. For more details, see: https://github.com/grpc/proposal/blob/master/A101-SNI-setting-and-SNI-SAN-validation.md
XDSSPIFFEEnabled controls if SPIFFE Bundle Maps can be used as roots of trust. For more details, see: https://github.com/grpc/proposal/blob/master/A87-mtls-spiffe-support.md
XDSSystemRootCertsEnabled is true when xDS enabled gRPC clients can use the system's default root certificates for TLS certificate validation. For more details, see: https://github.com/grpc/proposal/blob/master/A82-xds-system-root-certs.md.
Package-Level Constants (total 6, in which 4 are exported)
AllGoroutineLabels is an or'd together bitfield of all valid GoroutineLabels constant values (above).
GoroutineLabelServerMethod sets the grpc.method label on new server-side gRPC streams.
XDSBootstrapFileContentEnv is the env variable to set bootstrap file content. Do not use this and read from env directly. Its value is read and kept in variable XDSBootstrapFileContent. When both bootstrap FileName and FileContent are set, FileName is used.
XDSBootstrapFileNameEnv is the env variable to set bootstrap file name. Do not use this and read from env directly. Its value is read and kept in variable XDSBootstrapFileName. When both bootstrap FileName and FileContent are set, FileName is used.