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

Function ForceServerCodecV2

server.go:408–412  ·  view source on GitHub ↗

ForceServerCodecV2 is the equivalent of ForceServerCodec, but for the new CodecV2 interface. Will be supported throughout 1.x. # Experimental Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.

(codecV2 encoding.CodecV2)

Source from the content-addressed store, hash-verified

406// Notice: This API is EXPERIMENTAL and may be changed or removed in a
407// later release.
408func ForceServerCodecV2(codecV2 encoding.CodecV2) ServerOption {
409 return newFuncServerOption(func(o *serverOptions) {
410 o.codec = codecV2
411 })
412}
413
414// RPCCompressor returns a ServerOption that sets a compressor for outbound
415// messages. For backward compatibility, all outbound messages will be sent

Calls 1

newFuncServerOptionFunction · 0.85

Tested by 3

TestForceServerCodecMethod · 0.74