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

NacosNamingClient 的subscribe 无法订阅所有集群的实例,如果不传集群名,默认订阅DEFAULT,而go版本的sdk是可以订阅所有集群实例的 #91

Open
Dollbug opened this issue Jun 7, 2022 · 4 comments

Comments

@Dollbug
Copy link

Dollbug commented Jun 7, 2022

image

@AntiMoron
Copy link

说回来这个serverList起名是list,传的是字符串。
然后字符串的格式咱们一窍不通~文档也没写!

@JxJPu9bD
Copy link

说回来这个serverList起名是list,传的是字符串。 然后字符串的格式咱们一窍不通~文档也没写!

你这个说的有点无理取闹了, 点进声明看一下不就知道了

image

@JxJPu9bD
Copy link

image
我也想获取 groupName下的所有实例, 但是现在serviceName 是必传, 我可能只能改造我的服务注册为相同的 serviceName了, 但是 subscribe好像无法实时

@AntiMoron
Copy link

AntiMoron commented Jun 28, 2024

@JxJPu9bD OK,既然声明写的这么好,那写文档干嘛呢?!另外你截图的这个d.ts有一丁点注释吗?他写的真的很好吗?了解下JSDoc?
image

要不要我贴一段react/index.d.ts给你看看?
image

如果是我写:

/**
 * @brief 用于NamingClient的Config
 */
interface NacosNamingClientConfig {
   /**
    * @brief 服务器列表,下面的示例两者等价
    * @example
    * 'server1.xxxx.com,server2.xxxx.com'
    * ['server1.xxxx.com', 'server2.xxxx.com']
    */
   serverList: string | string[];
}

很难吗?不难吧?而且还能根据注释生成doc直接部署到网站;真不知道是没用过好的开源产品还是怎么的?弄不清

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants