Skip to content

Add support to set the value of rpc-encoding header#436

Merged
bananacocodrilo merged 5 commits into
yarpc:devfrom
bananacocodrilo:support-rpc-encoding
Mar 3, 2026
Merged

Add support to set the value of rpc-encoding header#436
bananacocodrilo merged 5 commits into
yarpc:devfrom
bananacocodrilo:support-rpc-encoding

Conversation

@bananacocodrilo

Copy link
Copy Markdown
Contributor

Yarpc supports custom codecs defined by the user. It uses the rpc-encoding header to decide which codec to use.

This flag allows developers to overwrite the content of the rpc-encoding header so the destination service selects the desired codec.

Comment thread rpc_encoding_flag_test.go

@mark200 mark200 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread options.go Outdated
RoutingKey string `long:"rk" description:"The routing key overrides the service name traffic group for proxies."`
RoutingDelegate string `long:"rd" description:"The routing delegate overrides the routing key traffic group for proxies."`
ShardKey string `long:"sk" description:"The shard key is a transport header that clues where to send a request within a clustered traffic group."`
RPCEncoding string `long:"rpc-encoding" description:"Override the rpc-encoding header/metadata value for gRPC and HTTP transports. This does not re-encode the request body and is intended for development."`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: can we add short option for this as well

@bananacocodrilo bananacocodrilo merged commit cace6b5 into yarpc:dev Mar 3, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants