Alanxtl commented on PR #2947: URL: https://github.com/apache/dubbo-go/pull/2947#issuecomment-3067031936
> > > Need more information, why add RegistryType, why expose two APIs?需要更多信息,为什么添加 RegistryType,为什么暴露两个 API? > > > > > > > > 1. Why expose two APIs 为什么暴露两个 API > > According to polaris previous implementation, `RegistryType` has two types `service` and `interface`, and we already have `WithRegisterInterface()` in `registry/options.go:186` which set `RegistryType` to `interface`. But we don't have `WithRegisterService()` to set RegistryType to `service`, so I expose it.根据 Polaris 之前的实现, `RegistryType` 有两种类型 `service` 和 `interface` ,我们在 `registry/options.go:186` 中已经有了 `WithRegisterInterface()` ,它将 `RegistryType` 设置为 `interface` 。但我们没有 `WithRegisterService()` 来将 RegistryType 设置为 `service` ,所以我将其公开。 > > And I add `WithRegistryType()` because the registryType imformation won't be Report previous我添加 `WithRegistryType()` 是因为 registryType 信息不会报告之前 > > 2. Why add RegistryType 为什么要添加 RegistryType > > Because `polaris tps limiter`'s behaviour vairous when get different type of `RegistryType`, and previous implemention gets `RegistryType` from `root_config`, in order to replace the use of `config`, We need to transfer `RegistryType` in `url` so I add it.因为 `polaris tps limiter` 在不同类型的 `RegistryType` 获取时的行为不同,而之前的实现从 `root_config` 获取 `RegistryType` ,为了替换 `config` 的使用,我们需要在 `url` 中转移 `RegistryType` ,所以我添加了它。 > > Can you provide me with some test code? Is it convenient for us to verify done, see https://github.com/apache/dubbo-go-samples/pull/868 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For additional commands, e-mail: notifications-h...@dubbo.apache.org