Skip to content

Commit

Permalink
envconfig: re-add AdvertiseCompressors temporarily
Browse files Browse the repository at this point in the history
  • Loading branch information
dfawley committed Nov 3, 2023
1 parent 70f1a40 commit 6950492
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/envconfig/envconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ import (
var (
// TXTErrIgnore is set if TXT errors should be ignored ("GRPC_GO_IGNORE_TXT_ERRORS" is not "false").
TXTErrIgnore = boolFromEnv("GRPC_GO_IGNORE_TXT_ERRORS", true)
// AdvertiseCompressors is set if registered compressor should be advertised
// ("GRPC_GO_ADVERTISE_COMPRESSORS" is not "false").
AdvertiseCompressors = boolFromEnv("GRPC_GO_ADVERTISE_COMPRESSORS", true)
// 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
Expand Down
3 changes: 3 additions & 0 deletions internal/grpcutil/compressor.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,8 @@ func IsCompressorNameRegistered(name string) bool {
// RegisteredCompressors returns a string of registered compressor names
// separated by comma.
func RegisteredCompressors() string {
if !envconfig.AdvertiseCompressors {

Check failure on line 41 in internal/grpcutil/compressor.go

View workflow job for this annotation

GitHub Actions / upload

undefined: envconfig

Check failure on line 41 in internal/grpcutil/compressor.go

View workflow job for this annotation

GitHub Actions / tests (tests, 1.21)

undefined: envconfig

Check failure on line 41 in internal/grpcutil/compressor.go

View workflow job for this annotation

GitHub Actions / tests (tests, 1.21, -race)

undefined: envconfig

Check failure on line 41 in internal/grpcutil/compressor.go

View workflow job for this annotation

GitHub Actions / tests (tests, 1.21, 386)

undefined: envconfig

Check failure on line 41 in internal/grpcutil/compressor.go

View workflow job for this annotation

GitHub Actions / tests (tests, 1.21, arm64)

undefined: envconfig

Check failure on line 41 in internal/grpcutil/compressor.go

View workflow job for this annotation

GitHub Actions / tests (tests, 1.20)

undefined: envconfig

Check failure on line 41 in internal/grpcutil/compressor.go

View workflow job for this annotation

GitHub Actions / tests (tests, 1.19)

undefined: envconfig
return ""
}
return strings.Join(RegisteredCompressorNames, ",")
}

0 comments on commit 6950492

Please sign in to comment.