WithDecompressor returns a DialOption which sets a Decompressor to use for incoming message decompression. If incoming response messages are encoded using the decompressor's Type(), it will be used. Otherwise, the message encoding will be used to look up the compressor registered via encoding.Regi
(dc Decompressor)
| 308 | // Deprecated: use encoding.RegisterCompressor instead. Will be supported |
| 309 | // throughout 1.x. |
| 310 | func WithDecompressor(dc Decompressor) DialOption { |
| 311 | return newFuncDialOption(func(o *dialOptions) { |
| 312 | o.dc = dc |
| 313 | }) |
| 314 | } |
| 315 | |
| 316 | // WithConnectParams configures the ClientConn to use the provided ConnectParams |
| 317 | // for creating and maintaining connections to servers. |