You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I finally decided to do this in version 0.9. The 0.9 version of the goal is to reduce the difficulty of deployment, which makes it easier to support more operating systems.
大家好,我准备放弃使用 r3 来实现路由。原因有一下几个:
目前使用的 resty-radixtree 是没有这些问题的。
我相信有些同学肯定会问,如果我的业务需求上必须要使用正则方式匹配 uri ,这时候 resty-radixtree 是不是就不能满足呢?
比如有这样一个 API:
/v1/user/1
, 前面/v1/user
分别代表前缀,后面是user
的 id,是个整数。在 r3 中是这么写:
/v1/user/{id:[0-9]+}
在 resty-radixtree 中也可以实现,更多参考文档。虽然这么做看似更复杂,但好处是我们可以享用 radixtree 的高效(至少比 r3 有 10 倍的性能差别)
{path = "/v1/user/*", vars = {"request_uri", "~~", [[\/v1\/user\/\d+]]}}
如果您喜欢或者不喜欢,都欢迎留言。
The text was updated successfully, but these errors were encountered: