Scout Wang
Scout Wang
The number on the document is misspelled. We would fix it.
Can you provide more detailed descriptions like the concrete code location or code screenshot?
I'll implement this functionality this week.
I would add this feature in next PR.
Temporary triple design documentation: # Triple-go ## 设计目标 1. 在完全兼容Grpc,保证与老应用正常通信的基础上,支持h1和h2下采用curl,浏览器等web方式直接访问服务,无需任何配置 2. 剥除对grpc-go的依赖,使用net/http 3. 保持 编写IDL文件->protoc编译自动生成stub代码->实现业务逻辑 的工作模式,stub代码结构与接口向Grpc靠近(暂定) ## 设计细节 #### 组成 Rest + Grpc,服务端在单端口上同时支持这两种协议,客户端由用户选择调用方式,默认为Grpc #### 协议区分 统一进入ServeHTTP(responseWriter http.ResponseWriter, request *http.Request)后, POST/GET?...
> Don't you think the current subscribing model is too heavy to maintain? We have tons of concepts, like "Directory", "Node", etc. The objective is to streamline our framework, not...
> 依赖确实有点容易循环,有些模块会把一模一样的配置再拷贝一个 struct 出来,只是为了避免循环依赖,例如 [https://github.com/apache/dubbo-go/blob/bf5f2ddf40eaf9779355a692bab7842e290b54b2/config/metric_config.go#L45C55-L45C55,](https://github.com/apache/dubbo-go/blob/bf5f2ddf40eaf9779355a692bab7842e290b54b2/config/metric_config.go#L45C55-L45C55%EF%BC%8C) 是不是可以考虑做彻底点,把 config 只作为被依赖方,不再依赖其他模块 config包之前做为项目入口一直是顶层模块,如果不依赖其他模块,config.Load这一套启动流程没法保证。我的想法是config包做为顶层模块,把配置都往下传,层次较低的模块只看配置,不感知config包。 而且除了config包,extension包也有循环依赖的问题,我们应该梳理一下整体的依赖情况,尽量保证自顶向下依赖的逻辑是通顺的。
> > 把配置都往下传 > > 是怎么个传法,用 url ? 1. 直接依赖,使用Init(opts ...option)方式把参数注入进去 比如ConsumerConfig依赖ReferenceConfig,之前是Init(rc *RootConfig),现在是Init(opts ...ReferenceOption)。这个需要我们对dubbo-go做好分层。 2. invoker链串联 使用URL传静态配置(config.Load时完成的所有配置),使用Invocation传动态配置(invoker链执行时查看)。invocation目前已经可以传复杂配置,URL也需要支持类似map[string]interface{}的复杂配置。每个invoker内部只管传进来的配置,不去config包拿。
### client-side sending headers ```go ctx := triple.NewOutgoingContext(context.Background(), http.Header{"hello", "triple"}) resp, err := cli.Greet(ctx, &v1.GreetRequest{}) // or ctx := triple.NewOutgoingContext(context.Background(), http.Header{"hello", "triple"}) ctx = triple.AppendToOutgoingContext(ctx, "hello", "dubbo", "hey", "hessian") resp,...