MCPcopy
hub / github.com/grpc/grpc-go / WithDecompressor

Function WithDecompressor

dialoptions.go:310–314  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

308// Deprecated: use encoding.RegisterCompressor instead. Will be supported
309// throughout 1.x.
310func 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.

Callers 4

makeClientsFunction · 0.92
configDialMethod · 0.92
clientConnMethod · 0.92

Calls 1

newFuncDialOptionFunction · 0.85

Tested by 3

configDialMethod · 0.74
clientConnMethod · 0.74