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

Function ForceCodecV2

rpc_util.go:652–654  ·  view source on GitHub ↗

ForceCodecV2 returns a CallOption that will set codec to be used for all request and response messages for a call. The result of calling Name() will be used as the content-subtype after converting to lowercase, unless CallContentSubtype is also used. See Content-Type on https://github.com/grpc/grpc

(codec encoding.CodecV2)

Source from the content-addressed store, hash-verified

650// Notice: This API is EXPERIMENTAL and may be changed or removed in a
651// later release.
652func ForceCodecV2(codec encoding.CodecV2) CallOption {
653 return ForceCodecV2CallOption{CodecV2: codec}
654}
655
656// ForceCodecV2CallOption is a CallOption that indicates the codec used for
657// marshaling messages.

Calls

no outgoing calls