Config for a gRPC client.
| 25 | |
| 26 | // Config for a gRPC client. |
| 27 | type Config struct { |
| 28 | MaxRecvMsgSize int `yaml:"max_recv_msg_size" category:"advanced"` |
| 29 | MaxSendMsgSize int `yaml:"max_send_msg_size" category:"advanced"` |
| 30 | GRPCCompression string `yaml:"grpc_compression" category:"advanced"` |
| 31 | RateLimit float64 `yaml:"rate_limit" category:"advanced"` |
| 32 | RateLimitBurst int `yaml:"rate_limit_burst" category:"advanced"` |
| 33 | |
| 34 | BackoffOnRatelimits bool `yaml:"backoff_on_ratelimits" category:"advanced"` |
| 35 | BackoffConfig backoff.Config `yaml:"backoff_config"` |
| 36 | |
| 37 | InitialStreamWindowSize flagext.Bytes `yaml:"initial_stream_window_size" category:"experimental"` |
| 38 | InitialConnectionWindowSize flagext.Bytes `yaml:"initial_connection_window_size" category:"experimental"` |
| 39 | |
| 40 | TLSEnabled bool `yaml:"tls_enabled" category:"advanced"` |
| 41 | TLS tls.ClientConfig `yaml:",inline"` |
| 42 | |
| 43 | ConnectTimeout time.Duration `yaml:"connect_timeout" category:"advanced"` |
| 44 | // https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md |
| 45 | ConnectBackoffBaseDelay time.Duration `yaml:"connect_backoff_base_delay" category:"advanced"` |
| 46 | ConnectBackoffMaxDelay time.Duration `yaml:"connect_backoff_max_delay" category:"advanced"` |
| 47 | |
| 48 | Middleware []grpc.UnaryClientInterceptor `yaml:"-"` |
| 49 | StreamMiddleware []grpc.StreamClientInterceptor `yaml:"-"` |
| 50 | |
| 51 | // CustomCompressors allows configuring custom compressors. |
| 52 | CustomCompressors []string `yaml:"-"` |
| 53 | |
| 54 | ClusterValidation clusterutil.ClusterValidationConfig `yaml:"cluster_validation" category:"experimental"` |
| 55 | |
| 56 | // clusterUnaryClientInterceptor is needed for testing purposes. |
| 57 | clusterUnaryClientInterceptor grpc.UnaryClientInterceptor `yaml:"-"` |
| 58 | } |
| 59 | |
| 60 | // RegisterFlags registers flags. |
| 61 | func (cfg *Config) RegisterFlags(f *flag.FlagSet) { |
nothing calls this directly
no outgoing calls
no test coverage detected