cloudwego / cloudwego/kitex

Feature Proposal: UnknownMethodHandler for KitexThrift/KitexProtobuf requests

Open
#1,321 3 comments 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
Go
Stars
8k
Forks
918
Avg merge
1d 13h
Merged PRs (30d)
7

Description

A normal Kitex server is based on the IDL generated code, responsible for decoding requests into the go struct for the method handler. If a request with a method name not defined in its IDL is sent to this server, it will simply complain "unknown method" and refuse to process it.

Kitex also provides the "binary generic server" way, which takes in a request payload as a binary slice and sends it to the generic method handler, regardless of the method requested.

The problem is, these two types of server can not both exist within one server.

In this proposal, we sugguest an `UnknownMethodHandler` mechanism for a normal Kitex server to deal with requests with unknown methods.

If you are interested in implementing this feature, please reply with your lark id, and kindly prepare for a detailed tech plan.

Note: this might not be easy for a new Kitex contributor.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.