CustomCodec 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. Deprecated: register codecs using encoding.RegisterCodec. The server will automatically use registered codecs ba
(codec Codec)
| 362 | // https://github.com/grpc/grpc-go/blob/master/Documentation/encoding.md#using-a-codec. |
| 363 | // Will be supported throughout 1.x. |
| 364 | func CustomCodec(codec Codec) ServerOption { |
| 365 | return newFuncServerOption(func(o *serverOptions) { |
| 366 | o.codec = newCodecV0Bridge(codec) |
| 367 | }) |
| 368 | } |
| 369 | |
| 370 | // ForceServerCodec returns a ServerOption that sets a codec for message |
| 371 | // marshaling and unmarshaling. |
no test coverage detected