Skip to content

Commit

Permalink
[custom_codec_deprecated] doc: mark CustomCodec as deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
menghanl committed Jun 18, 2020
1 parent 9a46550 commit f9caac0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server.go
Expand Up @@ -242,6 +242,10 @@ func KeepaliveEnforcementPolicy(kep keepalive.EnforcementPolicy) ServerOption {
// 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: server side codec can be registered, and it will be picked by the
// incoming message's content sub-type. See
// https://github.com/grpc/grpc-go/blob/master/Documentation/encoding.md#using-a-codec.
func CustomCodec(codec Codec) ServerOption {
return newFuncServerOption(func(o *serverOptions) {
o.codec = codec
Expand Down

0 comments on commit f9caac0

Please sign in to comment.