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)
| 406 | // Notice: This API is EXPERIMENTAL and may be changed or removed in a |
| 407 | // later release. |
| 408 | func 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 |