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

Function WithCompressor

dialoptions.go:294–298  ·  view source on GitHub ↗

WithCompressor returns a DialOption which sets a Compressor to use for message compression. It has lower priority than the compressor set by the UseCompressor CallOption. Deprecated: use UseCompressor instead. Will be supported throughout 1.x.

(cp Compressor)

Source from the content-addressed store, hash-verified

292//
293// Deprecated: use UseCompressor instead. Will be supported throughout 1.x.
294func WithCompressor(cp Compressor) DialOption {
295 return newFuncDialOption(func(o *dialOptions) {
296 o.compressorV0 = cp
297 })
298}
299
300// WithDecompressor returns a DialOption which sets a Decompressor to use for
301// incoming message decompression. If incoming response messages are encoded

Callers 7

makeClientsFunction · 0.92
TestGzipBadChecksumMethod · 0.92
configDialMethod · 0.92
clientConnMethod · 0.92

Calls 1

newFuncDialOptionFunction · 0.85

Tested by 6

TestGzipBadChecksumMethod · 0.74
configDialMethod · 0.74
clientConnMethod · 0.74