apache / apache/brpc

SelectiveChannel问题

Open
#1,090 0 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
C++
Stars
17.6k
Forks
4.1k
Avg merge
2d 12h
Merged PRs (30d)
69

Description

**Is your feature request related to a problem? (你需要的功能是否与某个问题有关?)**
我实现了一个私有协议,rpc请求里有几个类似 http headers 的特殊参数要设置。
我目前通过继承 Controller 来把特殊参数传进 protocol 的 pack_request 函数,这个 Controller 和普通的 channel 一起能正常工作。
但用到 SelectiveChannel 时,pack_request 传入的 Controller 不是我继承的那个,导致我无法获取参数。

**Describe the solution you'd like (描述你期望的解决方法)**
SelectiveChannel 能把特殊参数传进去

**Describe alternatives you've considered (描述你想到的折衷方案)**

**Additional context/screenshots (更多上下文/截图)**

Contributor guide

Open the contributing guide

Research direction

Start by tracing SelectiveChannel's request path into the protocol's pack_request entry point, comparing it with the ordinary channel path and how Controller values are passed. Determine how the caller's special parameters can remain available in SelectiveChannel, then verify that both channel types preserve them for the private protocol.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend-api-design
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.