ForceServerCodec returns a ServerOption that sets a codec for message marshaling and unmarshaling. This will override any lookups by content-subtype for Codecs registered with RegisterCodec. See Content-Type on https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests for more detail
(codec encoding.Codec)
| 391 | // Notice: This API is EXPERIMENTAL and may be changed or removed in a |
| 392 | // later release. |
| 393 | func ForceServerCodec(codec encoding.Codec) ServerOption { |
| 394 | return newFuncServerOption(func(o *serverOptions) { |
| 395 | o.codec = newCodecV1Bridge(codec) |
| 396 | }) |
| 397 | } |
| 398 | |
| 399 | // ForceServerCodecV2 is the equivalent of ForceServerCodec, but for the new |
| 400 | // CodecV2 interface. |
nothing calls this directly
no test coverage detected