File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,9 @@ import (
28
28
var (
29
29
// TXTErrIgnore is set if TXT errors should be ignored ("GRPC_GO_IGNORE_TXT_ERRORS" is not "false").
30
30
TXTErrIgnore = boolFromEnv ("GRPC_GO_IGNORE_TXT_ERRORS" , true )
31
+ // AdvertiseCompressors is set if registered compressor should be advertised
32
+ // ("GRPC_GO_ADVERTISE_COMPRESSORS" is not "false").
33
+ AdvertiseCompressors = boolFromEnv ("GRPC_GO_ADVERTISE_COMPRESSORS" , true )
31
34
// RingHashCap indicates the maximum ring size which defaults to 4096
32
35
// entries but may be overridden by setting the environment variable
33
36
// "GRPC_RING_HASH_CAP". This does not override the default bounds
Original file line number Diff line number Diff line change @@ -38,5 +38,8 @@ func IsCompressorNameRegistered(name string) bool {
38
38
// RegisteredCompressors returns a string of registered compressor names
39
39
// separated by comma.
40
40
func RegisteredCompressors () string {
41
+ if ! envconfig .AdvertiseCompressors {
42
+ return ""
43
+ }
41
44
return strings .Join (RegisteredCompressorNames , "," )
42
45
}
You can’t perform that action at this time.
0 commit comments