Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新增Handler #392

Closed
molin7596 opened this issue Nov 6, 2024 · 5 comments
Closed

新增Handler #392

molin7596 opened this issue Nov 6, 2024 · 5 comments
Labels
Q&A;提问与交流 Question and Answer、exchange

Comments

@molin7596
Copy link

新增一个Handler 在CmdAccessAuthHandler 和 CmdCacheHandler之间 怎么才能实现呢,PipelineContext只有 addFrist addLast

@molin7596
Copy link
Author

我的思路是 重写pipelineCustom 并且copy原有代码中间插入 ,但是如果源码有变动,怕后续忘记修改,目前想有什么更好的办法,在中间插入

@molin7596
Copy link
Author

我的目的是限制请求速率 ,在对外服添加Handler对某些路由实现限流,是否有更好的方法限制请求速率呢

@molin7596
Copy link
Author

或者能否实现 在某个Handler后面新增

@iohao
Copy link
Owner

iohao commented Nov 6, 2024

限制请求速率 addFrist 就行,因为该需求与现有的 handler 关联并不大。

或者重写 pipelineCustom 实现自定义编排,如果担心源码有变动可以关注每个版本的相关日志,通常这些变化会记录到版本日志中。

@iohao iohao added the Q&A;提问与交流 Question and Answer、exchange label Nov 6, 2024
@molin7596
Copy link
Author

#276 期待能包含路由、玩家+路由、玩家限流

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Q&A;提问与交流 Question and Answer、exchange
Projects
None yet
Development

No branches or pull requests

2 participants