@tencentcloud/sdk-mcp 1.2.5 → 1.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (370) hide show
  1. package/package.json +1 -1
  2. package/resource/doc/chatuikit/faq/common/server_error_code.md +74 -0
  3. package/resource/doc/chatuikit/faq/{freq_qa.md → native_sdk/faq.md} +2 -1
  4. package/resource/doc/chatuikit/faq/web_sdk/error_code.md +47 -0
  5. package/resource/doc/chatuikit/faq/web_sdk/faq.md +115 -0
  6. package/resource/doc/chatuikit/flutter/faq.md +117 -0
  7. package/resource/doc/chatuikit/iOS/faq.md +117 -0
  8. package/resource/doc/chatuikit/react/faq.md +26 -0
  9. package/resource/doc/chatuikit/vue/faq.md +35 -0
  10. package/resource/doc/livekit/faq/common/error_code.md +89 -0
  11. package/resource/doc/roomkit/common/error_code.md +67 -0
  12. package/resource/doc/rtcengine/faq/common/userSig.md +309 -0
  13. package/resource/doc/rtcengine/faq/{web.md → web/web.md} +2 -2
  14. package/resource/doc/rtcengine/faq/web_sdk/.gitkeep +0 -0
  15. package/resource/doc/rtcengine/web/{how_to_integrated_web_rtc_engine.md → how_to_integrated_web_sdk.md} +7 -2
  16. package/resource/doc/rtcengine/web/{how_to_run_web_rtc_engine_demo.md → how_to_run_web_sdk_demo.md} +1 -1
  17. package/resource/doc/tuicallkit/android/faq.md +1000 -0
  18. package/resource/doc/tuicallkit/faq/common/error_code.md +47 -0
  19. package/resource/doc/tuicallkit/flutter/faq.md +981 -0
  20. package/resource/doc/tuicallkit/{faq → iOS}/faq.md +0 -72
  21. package/resource/doc/tuicallkit/react/faq.md +986 -0
  22. package/resource/doc/tuicallkit/vue/faq.md +986 -0
  23. package/tools/call/get-native-call-integration.js +4 -10
  24. package/tools/call/get-native-call-integration.js.map +1 -1
  25. package/tools/call/get-web-call-api.js +4 -7
  26. package/tools/call/get-web-call-api.js.map +1 -1
  27. package/tools/call/get-web-call-integration.js +4 -9
  28. package/tools/call/get-web-call-integration.js.map +1 -1
  29. package/tools/chat/get-native-chat-integration.js +4 -8
  30. package/tools/chat/get-native-chat-integration.js.map +1 -1
  31. package/tools/chat/get-web-chat-component-detail.js +5 -10
  32. package/tools/chat/get-web-chat-component-detail.js.map +1 -1
  33. package/tools/chat/get-web-chat-integration.js +4 -12
  34. package/tools/chat/get-web-chat-integration.js.map +1 -1
  35. package/tools/chat/get-web-chat-uikit-init.js +5 -6
  36. package/tools/chat/get-web-chat-uikit-init.js.map +1 -1
  37. package/tools/chat/get-web-chat-window-integration.js +4 -12
  38. package/tools/chat/get-web-chat-window-integration.js.map +1 -1
  39. package/tools/chat/{create-group.js → get-web-create-group-doc.js} +5 -6
  40. package/tools/chat/get-web-create-group-doc.js.map +1 -0
  41. package/tools/common/get-faq.js +93 -0
  42. package/tools/common/get-faq.js.map +1 -0
  43. package/tools/common/get-usersig.js +9 -18
  44. package/tools/common/get-usersig.js.map +1 -1
  45. package/tools/common/present-framework-choice.js +3 -10
  46. package/tools/common/present-framework-choice.js.map +1 -1
  47. package/tools/common/record-prompt.js +5 -12
  48. package/tools/common/record-prompt.js.map +1 -1
  49. package/tools/common/record-result.js +7 -11
  50. package/tools/common/record-result.js.map +1 -1
  51. package/tools/definitions/get_faq_def.js +28 -0
  52. package/tools/definitions/get_faq_def.js.map +1 -0
  53. package/tools/definitions/get_native_call_uikit_integration_def.js +21 -0
  54. package/tools/definitions/get_native_call_uikit_integration_def.js.map +1 -0
  55. package/tools/definitions/get_native_chat_uikit_integration_def.js +21 -0
  56. package/tools/definitions/get_native_chat_uikit_integration_def.js.map +1 -0
  57. package/tools/definitions/get_usersig_def.js +34 -0
  58. package/tools/definitions/get_usersig_def.js.map +1 -0
  59. package/tools/definitions/get_web_call_uikit_api_def.js +23 -0
  60. package/tools/definitions/get_web_call_uikit_api_def.js.map +1 -0
  61. package/tools/definitions/get_web_call_uikit_integration_def.js +20 -0
  62. package/tools/definitions/get_web_call_uikit_integration_def.js.map +1 -0
  63. package/tools/definitions/get_web_chat_uikit_component_detail_def.js +24 -0
  64. package/tools/definitions/get_web_chat_uikit_component_detail_def.js.map +1 -0
  65. package/tools/definitions/get_web_chat_uikit_init_def.js +23 -0
  66. package/tools/definitions/get_web_chat_uikit_init_def.js.map +1 -0
  67. package/tools/definitions/get_web_chat_uikit_integration_def.js +26 -0
  68. package/tools/definitions/get_web_chat_uikit_integration_def.js.map +1 -0
  69. package/tools/definitions/get_web_chat_window_integration_def.js +26 -0
  70. package/tools/definitions/get_web_chat_window_integration_def.js.map +1 -0
  71. package/tools/definitions/get_web_create_group_doc_def.js +18 -0
  72. package/tools/definitions/get_web_create_group_doc_def.js.map +1 -0
  73. package/tools/definitions/get_web_live_state_detail_def.js +19 -0
  74. package/tools/definitions/get_web_live_state_detail_def.js.map +1 -0
  75. package/tools/definitions/get_web_live_uikit_component_detail_def.js +21 -0
  76. package/tools/definitions/get_web_live_uikit_component_detail_def.js.map +1 -0
  77. package/tools/definitions/get_web_room_state_detail_def.js +19 -0
  78. package/tools/definitions/get_web_room_state_detail_def.js.map +1 -0
  79. package/tools/definitions/present_framework_choice_def.js +24 -0
  80. package/tools/definitions/present_framework_choice_def.js.map +1 -0
  81. package/tools/definitions/record_prompt_def.js +22 -0
  82. package/tools/definitions/record_prompt_def.js.map +1 -0
  83. package/tools/definitions/record_result_def.js +22 -0
  84. package/tools/definitions/record_result_def.js.map +1 -0
  85. package/tools/index.js +13 -11
  86. package/tools/index.js.map +1 -1
  87. package/tools/live/get-web-live-component-detail.js +5 -7
  88. package/tools/live/get-web-live-component-detail.js.map +1 -1
  89. package/tools/live/get-web-live-state-detail.js +5 -7
  90. package/tools/live/get-web-live-state-detail.js.map +1 -1
  91. package/tools/room/get-web-room-state-detail.js +5 -7
  92. package/tools/room/get-web-room-state-detail.js.map +1 -1
  93. package/tools/rtcengine/get-rtcengine-web-sdk-integration.js +28 -0
  94. package/tools/rtcengine/get-rtcengine-web-sdk-integration.js.map +1 -0
  95. package/tools/rtcengine/get-trtc-sdk-faq.js +32 -0
  96. package/tools/rtcengine/get-trtc-sdk-faq.js.map +1 -0
  97. package/tools/rtcengine/get-trtc-web-sdk-api.js +28 -0
  98. package/tools/rtcengine/get-trtc-web-sdk-api.js.map +1 -0
  99. package/tools/rtcengine/get-trtc-web-sdk-faq.js +2 -3
  100. package/tools/rtcengine/get-trtc-web-sdk-faq.js.map +1 -1
  101. package/tools/rtcengine/get-trtc-web-sdk-integration.js +29 -0
  102. package/tools/rtcengine/get-trtc-web-sdk-integration.js.map +1 -0
  103. package/utils/report-cls-client.js +1 -1
  104. package/utils/report-es-client.js +1 -1
  105. package/libs/@tencent/aegis-node-sdk/CHANGELOG.md +0 -8
  106. package/libs/@tencent/aegis-node-sdk/LICENSE +0 -21
  107. package/libs/@tencent/aegis-node-sdk/README.md +0 -562
  108. package/libs/@tencent/aegis-node-sdk/lib/aegis.min.js +0 -1
  109. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/constant/config.d.ts +0 -14
  110. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/constant/global.d.ts +0 -1
  111. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/constant/index.d.ts +0 -9
  112. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/constant/report-ignore.d.ts +0 -2
  113. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/core.d.ts +0 -85
  114. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/hooks/afterRequestHooks.d.ts +0 -3
  115. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/hooks/beforeRequestHooks.d.ts +0 -9
  116. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/hooks/modifyRequestHooks.d.ts +0 -3
  117. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/index.d.ts +0 -9
  118. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/interface/config.d.ts +0 -62
  119. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/interface/env.d.ts +0 -11
  120. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/interface/index.d.ts +0 -4
  121. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/interface/log.d.ts +0 -130
  122. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/interface/send.d.ts +0 -34
  123. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/format.d.ts +0 -2
  124. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/index.d.ts +0 -18
  125. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/length-limit.d.ts +0 -8
  126. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/pv.d.ts +0 -8
  127. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/remove-payload.d.ts +0 -2
  128. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/repeat-limit.d.ts +0 -4
  129. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/report.d.ts +0 -10
  130. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/sample.d.ts +0 -3
  131. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/throttle.d.ts +0 -3
  132. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/index.d.ts +0 -34
  133. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/jwt.d.ts +0 -12
  134. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/ot-js.d.ts +0 -14
  135. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/trace/uuid.d.ts +0 -2
  136. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/whitelist.d.ts +0 -12
  137. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/pipes/write-before.d.ts +0 -3
  138. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/plugin.d.ts +0 -33
  139. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/util/destroy.d.ts +0 -2
  140. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/util/event-emitter.d.ts +0 -18
  141. package/libs/@tencent/aegis-node-sdk/lib/packages/core/src/util/index.d.ts +0 -60
  142. package/libs/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/index.d.ts +0 -15
  143. package/libs/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/interface/selector.d.ts +0 -5
  144. package/libs/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/pipes/batch-report-pipe.d.ts +0 -6
  145. package/libs/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/protocol/protocol_base.d.ts +0 -18
  146. package/libs/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/protocol/protocol_http.d.ts +0 -12
  147. package/libs/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/selector/ip_selector.d.ts +0 -10
  148. package/libs/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/selector/polaris_selector.d.ts +0 -20
  149. package/libs/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/selector/selector_base.d.ts +0 -27
  150. package/libs/@tencent/aegis-node-sdk/lib/packages/node-sdk/src/util/eval_require.d.ts +0 -2
  151. package/libs/@tencent/aegis-node-sdk/package.json +0 -19
  152. package/libs/@tencent/polaris/README.md +0 -407
  153. package/libs/@tencent/polaris/dist/consumer/health.d.ts +0 -126
  154. package/libs/@tencent/polaris/dist/consumer/health.js +0 -283
  155. package/libs/@tencent/polaris/dist/consumer/health.js.map +0 -1
  156. package/libs/@tencent/polaris/dist/consumer/index.d.ts +0 -120
  157. package/libs/@tencent/polaris/dist/consumer/index.js +0 -348
  158. package/libs/@tencent/polaris/dist/consumer/index.js.map +0 -1
  159. package/libs/@tencent/polaris/dist/consumer/monitor.d.ts +0 -145
  160. package/libs/@tencent/polaris/dist/consumer/monitor.js +0 -343
  161. package/libs/@tencent/polaris/dist/consumer/monitor.js.map +0 -1
  162. package/libs/@tencent/polaris/dist/consumer/selector.d.ts +0 -73
  163. package/libs/@tencent/polaris/dist/consumer/selector.js +0 -316
  164. package/libs/@tencent/polaris/dist/consumer/selector.js.map +0 -1
  165. package/libs/@tencent/polaris/dist/errors.d.ts +0 -373
  166. package/libs/@tencent/polaris/dist/errors.js +0 -154
  167. package/libs/@tencent/polaris/dist/errors.js.map +0 -1
  168. package/libs/@tencent/polaris/dist/global.d.ts +0 -16
  169. package/libs/@tencent/polaris/dist/global.js +0 -18
  170. package/libs/@tencent/polaris/dist/global.js.map +0 -1
  171. package/libs/@tencent/polaris/dist/index.d.ts +0 -62
  172. package/libs/@tencent/polaris/dist/index.js +0 -145
  173. package/libs/@tencent/polaris/dist/index.js.map +0 -1
  174. package/libs/@tencent/polaris/dist/instance.d.ts +0 -109
  175. package/libs/@tencent/polaris/dist/instance.js +0 -38
  176. package/libs/@tencent/polaris/dist/instance.js.map +0 -1
  177. package/libs/@tencent/polaris/dist/limiter/bucket.d.ts +0 -51
  178. package/libs/@tencent/polaris/dist/limiter/bucket.js +0 -152
  179. package/libs/@tencent/polaris/dist/limiter/bucket.js.map +0 -1
  180. package/libs/@tencent/polaris/dist/limiter/index.d.ts +0 -73
  181. package/libs/@tencent/polaris/dist/limiter/index.js +0 -149
  182. package/libs/@tencent/polaris/dist/limiter/index.js.map +0 -1
  183. package/libs/@tencent/polaris/dist/limiter/ratelimit.d.ts +0 -27
  184. package/libs/@tencent/polaris/dist/limiter/ratelimit.js +0 -134
  185. package/libs/@tencent/polaris/dist/limiter/ratelimit.js.map +0 -1
  186. package/libs/@tencent/polaris/dist/limiter/ratelimiter/base.d.ts +0 -17
  187. package/libs/@tencent/polaris/dist/limiter/ratelimiter/base.js +0 -15
  188. package/libs/@tencent/polaris/dist/limiter/ratelimiter/base.js.map +0 -1
  189. package/libs/@tencent/polaris/dist/limiter/ratelimiter/global.d.ts +0 -59
  190. package/libs/@tencent/polaris/dist/limiter/ratelimiter/global.js +0 -397
  191. package/libs/@tencent/polaris/dist/limiter/ratelimiter/global.js.map +0 -1
  192. package/libs/@tencent/polaris/dist/limiter/ratelimiter/index.d.ts +0 -3
  193. package/libs/@tencent/polaris/dist/limiter/ratelimiter/index.js +0 -19
  194. package/libs/@tencent/polaris/dist/limiter/ratelimiter/index.js.map +0 -1
  195. package/libs/@tencent/polaris/dist/limiter/ratelimiter/local.d.ts +0 -17
  196. package/libs/@tencent/polaris/dist/limiter/ratelimiter/local.js +0 -52
  197. package/libs/@tencent/polaris/dist/limiter/ratelimiter/local.js.map +0 -1
  198. package/libs/@tencent/polaris/dist/location.d.ts +0 -48
  199. package/libs/@tencent/polaris/dist/location.js +0 -67
  200. package/libs/@tencent/polaris/dist/location.js.map +0 -1
  201. package/libs/@tencent/polaris/dist/logging.d.ts +0 -106
  202. package/libs/@tencent/polaris/dist/logging.js +0 -130
  203. package/libs/@tencent/polaris/dist/logging.js.map +0 -1
  204. package/libs/@tencent/polaris/dist/metadata.d.ts +0 -78
  205. package/libs/@tencent/polaris/dist/metadata.js +0 -119
  206. package/libs/@tencent/polaris/dist/metadata.js.map +0 -1
  207. package/libs/@tencent/polaris/dist/plugins/breaker/polaris.d.ts +0 -47
  208. package/libs/@tencent/polaris/dist/plugins/breaker/polaris.js +0 -162
  209. package/libs/@tencent/polaris/dist/plugins/breaker/polaris.js.map +0 -1
  210. package/libs/@tencent/polaris/dist/plugins/lb/base.d.ts +0 -24
  211. package/libs/@tencent/polaris/dist/plugins/lb/base.js +0 -32
  212. package/libs/@tencent/polaris/dist/plugins/lb/base.js.map +0 -1
  213. package/libs/@tencent/polaris/dist/plugins/lb/edf.d.ts +0 -24
  214. package/libs/@tencent/polaris/dist/plugins/lb/edf.js +0 -77
  215. package/libs/@tencent/polaris/dist/plugins/lb/edf.js.map +0 -1
  216. package/libs/@tencent/polaris/dist/plugins/lb/hashring.d.ts +0 -24
  217. package/libs/@tencent/polaris/dist/plugins/lb/hashring.js +0 -53
  218. package/libs/@tencent/polaris/dist/plugins/lb/hashring.js.map +0 -1
  219. package/libs/@tencent/polaris/dist/plugins/lb/sticky.d.ts +0 -31
  220. package/libs/@tencent/polaris/dist/plugins/lb/sticky.js +0 -88
  221. package/libs/@tencent/polaris/dist/plugins/lb/sticky.js.map +0 -1
  222. package/libs/@tencent/polaris/dist/plugins/lb/swrr.d.ts +0 -25
  223. package/libs/@tencent/polaris/dist/plugins/lb/swrr.js +0 -72
  224. package/libs/@tencent/polaris/dist/plugins/lb/swrr.js.map +0 -1
  225. package/libs/@tencent/polaris/dist/plugins/lb/wr.d.ts +0 -17
  226. package/libs/@tencent/polaris/dist/plugins/lb/wr.js +0 -50
  227. package/libs/@tencent/polaris/dist/plugins/lb/wr.js.map +0 -1
  228. package/libs/@tencent/polaris/dist/plugins/lb/wrr.d.ts +0 -19
  229. package/libs/@tencent/polaris/dist/plugins/lb/wrr.js +0 -81
  230. package/libs/@tencent/polaris/dist/plugins/lb/wrr.js.map +0 -1
  231. package/libs/@tencent/polaris/dist/plugins/logging/console.d.ts +0 -10
  232. package/libs/@tencent/polaris/dist/plugins/logging/console.js +0 -38
  233. package/libs/@tencent/polaris/dist/plugins/logging/console.js.map +0 -1
  234. package/libs/@tencent/polaris/dist/plugins/naming/local-server/index.d.ts +0 -32
  235. package/libs/@tencent/polaris/dist/plugins/naming/local-server/index.js +0 -88
  236. package/libs/@tencent/polaris/dist/plugins/naming/local-server/index.js.map +0 -1
  237. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/base.d.ts +0 -124
  238. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/base.js +0 -398
  239. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/base.js.map +0 -1
  240. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/discover.d.ts +0 -27
  241. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/discover.js +0 -287
  242. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/discover.js.map +0 -1
  243. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/index.d.ts +0 -15
  244. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/index.js +0 -43
  245. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/index.js.map +0 -1
  246. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/monitor.d.ts +0 -28
  247. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/monitor.js +0 -249
  248. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/monitor.js.map +0 -1
  249. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/ratelimit.d.ts +0 -19
  250. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/ratelimit.js +0 -222
  251. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/adapter/ratelimit.js.map +0 -1
  252. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/bidi.d.ts +0 -26
  253. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/bidi.js +0 -99
  254. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/bidi.js.map +0 -1
  255. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/index.d.ts +0 -60
  256. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/index.js +0 -259
  257. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/index.js.map +0 -1
  258. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/pb/discover.proto +0 -24
  259. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/pb/monitor.proto +0 -18
  260. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/grpc/pb/ratelimit.proto +0 -12
  261. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/http/index.d.ts +0 -39
  262. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/http/index.js +0 -115
  263. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/connector/http/index.js.map +0 -1
  264. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/api.proto +0 -24
  265. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/client.proto +0 -22
  266. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/model.proto +0 -28
  267. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/ratelimit.proto +0 -80
  268. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/request.proto +0 -18
  269. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/response.proto +0 -65
  270. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/routing.proto +0 -66
  271. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/service.proto +0 -95
  272. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/discover-pb/types.d.ts +0 -1568
  273. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/index.d.ts +0 -36
  274. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/index.js +0 -51
  275. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/index.js.map +0 -1
  276. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/api.proto +0 -18
  277. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/circuitbreak.proto +0 -67
  278. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/request.proto +0 -82
  279. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/response.proto +0 -11
  280. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/sdkcache.proto +0 -46
  281. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/sdkconfiguration.proto +0 -16
  282. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/sdktoken.proto +0 -10
  283. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/monitor-pb/types.d.ts +0 -1102
  284. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/pool.d.ts +0 -29
  285. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/pool.js +0 -77
  286. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/pool.js.map +0 -1
  287. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/ratelimit-pb/api.proto +0 -12
  288. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/ratelimit-pb/ratelimit.proto +0 -28
  289. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/ratelimit-pb/types.d.ts +0 -395
  290. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/rules.d.ts +0 -13
  291. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/rules.js +0 -116
  292. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/rules.js.map +0 -1
  293. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/types.d.ts +0 -67
  294. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/types.js +0 -67
  295. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/types.js.map +0 -1
  296. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/utils.d.ts +0 -99
  297. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/utils.js +0 -217
  298. package/libs/@tencent/polaris/dist/plugins/naming/polaris-server/utils.js.map +0 -1
  299. package/libs/@tencent/polaris/dist/plugins/registry/memory.d.ts +0 -10
  300. package/libs/@tencent/polaris/dist/plugins/registry/memory.js +0 -50
  301. package/libs/@tencent/polaris/dist/plugins/registry/memory.js.map +0 -1
  302. package/libs/@tencent/polaris/dist/plugins/router/polaris/nearby.d.ts +0 -51
  303. package/libs/@tencent/polaris/dist/plugins/router/polaris/nearby.js +0 -145
  304. package/libs/@tencent/polaris/dist/plugins/router/polaris/nearby.js.map +0 -1
  305. package/libs/@tencent/polaris/dist/plugins/router/polaris/rule.d.ts +0 -11
  306. package/libs/@tencent/polaris/dist/plugins/router/polaris/rule.js +0 -174
  307. package/libs/@tencent/polaris/dist/plugins/router/polaris/rule.js.map +0 -1
  308. package/libs/@tencent/polaris/dist/plugins/router/trpc/canary.d.ts +0 -25
  309. package/libs/@tencent/polaris/dist/plugins/router/trpc/canary.js +0 -36
  310. package/libs/@tencent/polaris/dist/plugins/router/trpc/canary.js.map +0 -1
  311. package/libs/@tencent/polaris/dist/plugins/router/trpc/env.d.ts +0 -10
  312. package/libs/@tencent/polaris/dist/plugins/router/trpc/env.js +0 -34
  313. package/libs/@tencent/polaris/dist/plugins/router/trpc/env.js.map +0 -1
  314. package/libs/@tencent/polaris/dist/plugins/router/trpc/set.d.ts +0 -56
  315. package/libs/@tencent/polaris/dist/plugins/router/trpc/set.js +0 -106
  316. package/libs/@tencent/polaris/dist/plugins/router/trpc/set.js.map +0 -1
  317. package/libs/@tencent/polaris/dist/plugins/shaping/unirate.d.ts +0 -31
  318. package/libs/@tencent/polaris/dist/plugins/shaping/unirate.js +0 -124
  319. package/libs/@tencent/polaris/dist/plugins/shaping/unirate.js.map +0 -1
  320. package/libs/@tencent/polaris/dist/plugins/shaping/warmup.d.ts +0 -61
  321. package/libs/@tencent/polaris/dist/plugins/shaping/warmup.js +0 -171
  322. package/libs/@tencent/polaris/dist/plugins/shaping/warmup.js.map +0 -1
  323. package/libs/@tencent/polaris/dist/plugins/weight/polaris.d.ts +0 -23
  324. package/libs/@tencent/polaris/dist/plugins/weight/polaris.js +0 -159
  325. package/libs/@tencent/polaris/dist/plugins/weight/polaris.js.map +0 -1
  326. package/libs/@tencent/polaris/dist/plugins.d.ts +0 -619
  327. package/libs/@tencent/polaris/dist/plugins.js +0 -91
  328. package/libs/@tencent/polaris/dist/plugins.js.map +0 -1
  329. package/libs/@tencent/polaris/dist/polaris.d.ts +0 -33
  330. package/libs/@tencent/polaris/dist/polaris.js +0 -59
  331. package/libs/@tencent/polaris/dist/polaris.js.map +0 -1
  332. package/libs/@tencent/polaris/dist/provider/index.d.ts +0 -102
  333. package/libs/@tencent/polaris/dist/provider/index.js +0 -168
  334. package/libs/@tencent/polaris/dist/provider/index.js.map +0 -1
  335. package/libs/@tencent/polaris/dist/registry.d.ts +0 -174
  336. package/libs/@tencent/polaris/dist/registry.js +0 -660
  337. package/libs/@tencent/polaris/dist/registry.js.map +0 -1
  338. package/libs/@tencent/polaris/dist/rules.d.ts +0 -163
  339. package/libs/@tencent/polaris/dist/rules.js +0 -24
  340. package/libs/@tencent/polaris/dist/rules.js.map +0 -1
  341. package/libs/@tencent/polaris/dist/scripts/postinstall.d.ts +0 -1
  342. package/libs/@tencent/polaris/dist/scripts/postinstall.js +0 -71
  343. package/libs/@tencent/polaris/dist/scripts/postinstall.js.map +0 -1
  344. package/libs/@tencent/polaris/dist/service.d.ts +0 -18
  345. package/libs/@tencent/polaris/dist/service.js +0 -3
  346. package/libs/@tencent/polaris/dist/service.js.map +0 -1
  347. package/libs/@tencent/polaris/dist/skeleton.d.ts +0 -87
  348. package/libs/@tencent/polaris/dist/skeleton.js +0 -282
  349. package/libs/@tencent/polaris/dist/skeleton.js.map +0 -1
  350. package/libs/@tencent/polaris/dist/utils.d.ts +0 -36
  351. package/libs/@tencent/polaris/dist/utils.js +0 -74
  352. package/libs/@tencent/polaris/dist/utils.js.map +0 -1
  353. package/libs/@tencent/polaris/dist/weak.d.ts +0 -11
  354. package/libs/@tencent/polaris/dist/weak.js +0 -44
  355. package/libs/@tencent/polaris/dist/weak.js.map +0 -1
  356. package/libs/@tencent/polaris/package.json +0 -114
  357. package/resource/doc/chatuikit/faq/web_qa.md +0 -118
  358. package/tools/call/get-call-faq.js +0 -29
  359. package/tools/call/get-call-faq.js.map +0 -1
  360. package/tools/chat/create-group.js.map +0 -1
  361. package/tools/chat/get-chat-faq.js +0 -29
  362. package/tools/chat/get-chat-faq.js.map +0 -1
  363. package/tools/rtcengine/get-rtcengine-web-sdk-integration-guide.js +0 -34
  364. package/tools/rtcengine/get-rtcengine-web-sdk-integration-guide.js.map +0 -1
  365. package/tools/rtcengine/get-trtc-web-sdk-integration-guide.js +0 -35
  366. package/tools/rtcengine/get-trtc-web-sdk-integration-guide.js.map +0 -1
  367. /package/resource/doc/chatuikit/{faq/sdk_qa.md → android/faq.md} +0 -0
  368. /package/{libs/@tencent/aegis-node-sdk/lib/packages/core/src/polyfill.d.ts → resource/doc/livekit/vue/faq.md} +0 -0
  369. /package/resource/doc/{chatuikit/faq/vue_qa.md → roomkit/vue/faq.md} +0 -0
  370. /package/resource/doc/rtcengine/web/{api_RTCEngine.md → api.md} +0 -0
@@ -1,33 +0,0 @@
1
- export * as plugins from "./plugins";
2
- export * from "./plugins/breaker/polaris";
3
- export { StatelessLoadBalancerOptions } from "./plugins/lb/base";
4
- export * from "./plugins/lb/wrr";
5
- export * from "./plugins/lb/wr";
6
- export * from "./plugins/lb/edf";
7
- export * from "./plugins/lb/swrr";
8
- export * from "./plugins/lb/hashring";
9
- export * from "./plugins/lb/sticky";
10
- export * from "./plugins/naming/polaris-server";
11
- export * from "./plugins/naming/local-server";
12
- export * from "./plugins/registry/memory";
13
- export * from "./plugins/router/polaris/rule";
14
- export * from "./plugins/router/polaris/nearby";
15
- export * from "./plugins/router/trpc/env";
16
- export * from "./plugins/router/trpc/set";
17
- export * from "./plugins/router/trpc/canary";
18
- export * from "./plugins/weight/polaris";
19
- export * from "./plugins/shaping/unirate";
20
- export * from "./plugins/shaping/warmup";
21
- export * from "./instance";
22
- export * from "./rules";
23
- export * from "./metadata";
24
- export * from "./service";
25
- export * from "./location";
26
- export { CacheStat, RevisionLog } from "./registry";
27
- export { LogVerbosity, TraceCategory, LoggingFunc } from "./logging";
28
- export type { Logger } from "./logging";
29
- export { ApiStatKey, ApiStatValue } from "./skeleton";
30
- export * from "./errors";
31
- export { InternalConsumer, Consumer, ConsumerOptions, OptionalConsumerPluginList, CallArgsType, SelectResponse, StatusChangelog, StatusChangeRequest, ComputedStat, ComputeStatKey, StatProp } from "./consumer";
32
- export { Provider, ProviderOptions, OptionalProviderPluginList } from "./provider";
33
- export { Limiter, LimiterOptions, OptionalLimiterPluginList } from "./limiter";
@@ -1,59 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.Limiter = exports.Provider = exports.SelectResponse = exports.Consumer = exports.InternalConsumer = exports.LogVerbosity = exports.plugins = void 0;
18
- // #region 插件
19
- exports.plugins = require("./plugins");
20
- __exportStar(require("./plugins/breaker/polaris"), exports);
21
- __exportStar(require("./plugins/lb/wrr"), exports);
22
- __exportStar(require("./plugins/lb/wr"), exports);
23
- __exportStar(require("./plugins/lb/edf"), exports);
24
- __exportStar(require("./plugins/lb/swrr"), exports);
25
- __exportStar(require("./plugins/lb/hashring"), exports);
26
- __exportStar(require("./plugins/lb/sticky"), exports);
27
- __exportStar(require("./plugins/naming/polaris-server"), exports);
28
- __exportStar(require("./plugins/naming/local-server"), exports);
29
- __exportStar(require("./plugins/registry/memory"), exports);
30
- __exportStar(require("./plugins/router/polaris/rule"), exports);
31
- __exportStar(require("./plugins/router/polaris/nearby"), exports);
32
- __exportStar(require("./plugins/router/trpc/env"), exports);
33
- __exportStar(require("./plugins/router/trpc/set"), exports);
34
- __exportStar(require("./plugins/router/trpc/canary"), exports);
35
- __exportStar(require("./plugins/weight/polaris"), exports);
36
- __exportStar(require("./plugins/shaping/unirate"), exports);
37
- __exportStar(require("./plugins/shaping/warmup"), exports);
38
- // #endregion
39
- // #region 基础结构
40
- __exportStar(require("./instance"), exports);
41
- __exportStar(require("./rules"), exports);
42
- __exportStar(require("./metadata"), exports);
43
- __exportStar(require("./service"), exports);
44
- __exportStar(require("./location"), exports);
45
- var logging_1 = require("./logging");
46
- Object.defineProperty(exports, "LogVerbosity", { enumerable: true, get: function () { return logging_1.LogVerbosity; } });
47
- __exportStar(require("./errors"), exports);
48
- // #endregion
49
- // #region API
50
- var consumer_1 = require("./consumer");
51
- Object.defineProperty(exports, "InternalConsumer", { enumerable: true, get: function () { return consumer_1.InternalConsumer; } });
52
- Object.defineProperty(exports, "Consumer", { enumerable: true, get: function () { return consumer_1.Consumer; } });
53
- Object.defineProperty(exports, "SelectResponse", { enumerable: true, get: function () { return consumer_1.SelectResponse; } });
54
- var provider_1 = require("./provider");
55
- Object.defineProperty(exports, "Provider", { enumerable: true, get: function () { return provider_1.Provider; } });
56
- var limiter_1 = require("./limiter");
57
- Object.defineProperty(exports, "Limiter", { enumerable: true, get: function () { return limiter_1.Limiter; } });
58
- // #endregion
59
- //# sourceMappingURL=polaris.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"polaris.js","sourceRoot":"","sources":["../src/polaris.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,aAAa;AACb,uCAAqC;AACrC,4DAA0C;AAE1C,mDAAiC;AACjC,kDAAgC;AAChC,mDAAiC;AACjC,oDAAkC;AAClC,wDAAsC;AACtC,sDAAoC;AACpC,kEAAgD;AAChD,gEAA8C;AAC9C,4DAA0C;AAC1C,gEAA8C;AAC9C,kEAAgD;AAChD,4DAA0C;AAC1C,4DAA0C;AAC1C,+DAA6C;AAC7C,2DAAyC;AACzC,4DAA0C;AAC1C,2DAAyC;AACzC,aAAa;AAEb,eAAe;AACf,6CAA2B;AAC3B,0CAAwB;AACxB,6CAA2B;AAC3B,4CAA0B;AAC1B,6CAA2B;AAK3B,qCAAqE;AAA5D,uGAAA,YAAY,OAAA;AAGrB,2CAAyB;AACzB,aAAa;AAEb,cAAc;AACd,uCAAiN;AAAxM,4GAAA,gBAAgB,OAAA;AAAE,oGAAA,QAAQ,OAAA;AAA6D,0GAAA,cAAc,OAAA;AAC9G,uCAAmF;AAA1E,oGAAA,QAAQ,OAAA;AACjB,qCAA+E;AAAtE,kGAAA,OAAO,OAAA;AAChB,aAAa"}
@@ -1,102 +0,0 @@
1
- import { GlobalOptions } from "../global";
2
- import { LoggerOptions } from "../logging";
3
- import { PluginList, PluginType, RegisterOptions, RegistrationInstance } from "../plugins";
4
- import { SkeletonClass } from "../skeleton";
5
- import { RequireKeys } from "../utils";
6
- declare const kProvider: unique symbol;
7
- declare const kServiceToken: unique symbol;
8
- declare class RegisterResponse {
9
- readonly id: string;
10
- private readonly [kProvider];
11
- private readonly [kServiceToken];
12
- constructor(id: string, token: string, provider: Provider);
13
- /**
14
- * 服务注销
15
- * @returns 是否注销成功
16
- */
17
- unregister(): Promise<boolean>;
18
- /**
19
- * 服务心跳上报
20
- * @returns 是否上报成功
21
- */
22
- heartbeat(): Promise<boolean>;
23
- }
24
- export declare type ProviderOptions = GlobalOptions & LoggerOptions;
25
- declare type ProviderPluginList = Pick<PluginList, PluginType.NamingService | PluginType.TraceLogging | PluginType.StatReporter>;
26
- export declare type OptionalProviderPluginList = RequireKeys<Partial<ProviderPluginList>, PluginType.NamingService>;
27
- declare const kCurrentInstances: unique symbol;
28
- declare const KMaxInstances: unique symbol;
29
- export declare class Provider extends SkeletonClass<ProviderPluginList> {
30
- /**
31
- * note:
32
- * 由于类包含专用标识符时,`super` 调用必须是构造函数中的第一个语句。
33
- * 所以这里采用 `Symbol` 来实现 __私有静态属性__
34
- */
35
- private static [kCurrentInstances];
36
- private static [KMaxInstances];
37
- /**
38
- * 当前可实例化的最大次数
39
- */
40
- static get maxInstances(): number;
41
- /**
42
- * 设置可实例化的最大次数
43
- * @param n 最大次数
44
- */
45
- static setMaxInstances(n: number): void;
46
- /**
47
- * Create Provider
48
- * @param plugins 插件
49
- * @param options 配置参数(可选)
50
- */
51
- constructor(plugins: OptionalProviderPluginList, options?: Partial<ProviderOptions>);
52
- /**
53
- * 销毁(释放)所占资源
54
- * @param sync 是否同步释放(可选)
55
- */
56
- dispose(sync?: boolean): void;
57
- /**
58
- * 服务注册
59
- * @param namespace 命名空间
60
- * @param service 服务名
61
- * @param token 服务 Token 用来鉴权
62
- * @param instance 待注册的实例
63
- * @param options 注册选项
64
- * @returns 可操作的实例对象(包含注册的实例 `id`)
65
- */
66
- register(namespace: string, service: string, token: string, instance: RegistrationInstance, options?: RegisterOptions): Promise<RegisterResponse>;
67
- /**
68
- * 服务注销
69
- * @param id 实例 ID
70
- * @param token 服务 Token 用来鉴权
71
- * @returns 是否注销成功
72
- */
73
- unregister(id: string, token: string): Promise<boolean>;
74
- /**
75
- * 服务注销
76
- * @param namespace 命名空间
77
- * @param service 服务名
78
- * @param host 节点 IP 或者域名
79
- * @param port 节点端口号
80
- * @param token 服务 Token 用来鉴权
81
- * @returns 是否注销成功
82
- */
83
- unregister(namespace: string, service: string, host: string, port: number, token: string): Promise<boolean>;
84
- /**
85
- * 服务心跳上报
86
- * @param id 实例唯一 ID
87
- * @param token 服务 Token 用来鉴权
88
- * @returns 是否发送成功
89
- */
90
- heartbeat(id: string, token: string): Promise<boolean>;
91
- /**
92
- * 服务心跳上报
93
- * @param namespace 命名空间
94
- * @param service 服务名
95
- * @param host 节点 IP 或者域名
96
- * @param port 节点端口号
97
- * @param token 服务 Token 用来鉴权
98
- * @returns 是否发送成功
99
- */
100
- heartbeat(namespace: string, service: string, host: string, port: number, token: string): Promise<boolean>;
101
- }
102
- export {};
@@ -1,168 +0,0 @@
1
- "use strict";
2
- var _a, _b;
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Provider = void 0;
5
- const process_1 = require("process");
6
- const errors_1 = require("../errors");
7
- const plugins_1 = require("../plugins");
8
- const console_1 = require("../plugins/logging/console");
9
- const skeleton_1 = require("../skeleton");
10
- const utils_1 = require("../utils");
11
- const kProvider = Symbol("kProvider");
12
- const kServiceToken = Symbol("kServiceToken");
13
- class RegisterResponse {
14
- constructor(id, token, provider) {
15
- this.id = id;
16
- this[kServiceToken] = token;
17
- this[kProvider] = provider;
18
- }
19
- /**
20
- * 服务注销
21
- * @returns 是否注销成功
22
- */
23
- async unregister() {
24
- return this[kProvider].unregister(this.id, this[kServiceToken]);
25
- }
26
- /**
27
- * 服务心跳上报
28
- * @returns 是否上报成功
29
- */
30
- async heartbeat() {
31
- return this[kProvider].heartbeat(this.id, this[kServiceToken]);
32
- }
33
- }
34
- const kCurrentInstances = Symbol("kCurrentInstances");
35
- const KMaxInstances = Symbol("KMaxInstances");
36
- class Provider extends skeleton_1.SkeletonClass {
37
- /**
38
- * Create Provider
39
- * @param plugins 插件
40
- * @param options 配置参数(可选)
41
- */
42
- constructor(plugins, options = {}) {
43
- Provider[kCurrentInstances] += 1;
44
- if (Provider[kCurrentInstances] >= Provider[KMaxInstances]) {
45
- (0, skeleton_1.emitMaxInstancesExceededWarning)("Consumer", Provider[KMaxInstances]);
46
- }
47
- // #region plugin
48
- const pluginList = {
49
- [plugins_1.PluginType.NamingService]: plugins[plugins_1.PluginType.NamingService],
50
- [plugins_1.PluginType.TraceLogging]: plugins[plugins_1.PluginType.TraceLogging] || [new console_1.ConsoleTraceLogging()],
51
- [plugins_1.PluginType.StatReporter]: plugins[plugins_1.PluginType.StatReporter] || []
52
- };
53
- const naming = pluginList[plugins_1.PluginType.NamingService];
54
- /**
55
- * 在某些特殊场景下,为了避免死循环与内存开销,
56
- * `NamingService` 与 `StatReporter` 插件实现在一个对象内
57
- */
58
- if ((0, skeleton_1.isStatReporterPlugin)(naming)) {
59
- pluginList[plugins_1.PluginType.StatReporter].push(naming);
60
- }
61
- super(pluginList, options);
62
- // #endregion
63
- }
64
- /**
65
- * 当前可实例化的最大次数
66
- */
67
- static get maxInstances() {
68
- return Provider[KMaxInstances];
69
- }
70
- /**
71
- * 设置可实例化的最大次数
72
- * @param n 最大次数
73
- */
74
- static setMaxInstances(n) {
75
- if (typeof n !== "number" || n < 0 || Number.isNaN(n)) {
76
- throw new errors_1.ArgumentError("|n| must be a non-negative number");
77
- }
78
- Provider[KMaxInstances] = n;
79
- }
80
- /**
81
- * 销毁(释放)所占资源
82
- * @param sync 是否同步释放(可选)
83
- */
84
- dispose(sync = false) {
85
- if (this[skeleton_1.kDisposed]) {
86
- return;
87
- }
88
- super.dispose(sync);
89
- Provider[kCurrentInstances] -= 1;
90
- if (Provider[kCurrentInstances] < 0) {
91
- (0, utils_1.UNREACHABLE)();
92
- }
93
- }
94
- /**
95
- * 服务注册
96
- * @param namespace 命名空间
97
- * @param service 服务名
98
- * @param token 服务 Token 用来鉴权
99
- * @param instance 待注册的实例
100
- * @param options 注册选项
101
- * @returns 可操作的实例对象(包含注册的实例 `id`)
102
- */
103
- async register(namespace, service, token, instance, options) {
104
- const startTime = (0, process_1.uptime)();
105
- let id = "";
106
- let err;
107
- try {
108
- this[skeleton_1.kMaybeAlreadyDisposed]();
109
- id = await this.plugins[plugins_1.PluginType.NamingService].register(namespace, service, token, instance, options);
110
- }
111
- catch (e) {
112
- err = e;
113
- }
114
- this[skeleton_1.kAPICollector]("Provider.register", ((0, process_1.uptime)() - startTime) * utils_1.kSeconds, err);
115
- if (err) {
116
- throw err;
117
- }
118
- return new RegisterResponse(id, token, this);
119
- }
120
- async unregister(...args) {
121
- const startTime = (0, process_1.uptime)();
122
- let err;
123
- try {
124
- this[skeleton_1.kMaybeAlreadyDisposed]();
125
- return await this.plugins[plugins_1.PluginType.NamingService].unregister(...args);
126
- }
127
- catch (e) {
128
- err = e;
129
- }
130
- finally {
131
- this[skeleton_1.kAPICollector]("Provider.unregister", ((0, process_1.uptime)() - startTime) * utils_1.kSeconds, err);
132
- }
133
- throw err;
134
- }
135
- async heartbeat(...args) {
136
- const startTime = (0, process_1.uptime)();
137
- let err;
138
- try {
139
- this[skeleton_1.kMaybeAlreadyDisposed]();
140
- return await this.plugins[plugins_1.PluginType.NamingService].heartbeat(...args);
141
- }
142
- catch (e) {
143
- err = e;
144
- }
145
- finally {
146
- this[skeleton_1.kAPICollector]("Provider.heartbeat", ((0, process_1.uptime)() - startTime) * utils_1.kSeconds, err);
147
- }
148
- throw err;
149
- }
150
- }
151
- exports.Provider = Provider;
152
- _a = Provider, _b = kCurrentInstances;
153
- /**
154
- * note:
155
- * 由于类包含专用标识符时,`super` 调用必须是构造函数中的第一个语句。
156
- * 所以这里采用 `Symbol` 来实现 __私有静态属性__
157
- */
158
- Provider[_b] = 0;
159
- (() => {
160
- let maxInstances = 3;
161
- const { POLARIS_PROVIDER_INSTANCE_LIMIT } = process.env;
162
- if (POLARIS_PROVIDER_INSTANCE_LIMIT !== undefined) {
163
- maxInstances = parseInt(POLARIS_PROVIDER_INSTANCE_LIMIT, 10);
164
- maxInstances = (maxInstances === 0 /** Unlimited */ ? Infinity : maxInstances);
165
- }
166
- _a.setMaxInstances(maxInstances);
167
- })();
168
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/provider/index.ts"],"names":[],"mappings":";;;;AAAA,qCAAiC;AAEjC,sCAA0C;AAG1C,wCAA2F;AAC3F,wDAAiE;AACjE,0CAAoJ;AACpJ,oCAA8D;AAE9D,MAAM,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;AACtC,MAAM,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;AAC9C,MAAM,gBAAgB;IAIpB,YAA4B,EAAU,EAAE,KAAa,EAAE,QAAkB;QAA7C,OAAE,GAAF,EAAE,CAAQ;QACpC,IAAI,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC;QAC5B,IAAI,CAAC,SAAS,CAAC,GAAG,QAAQ,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,UAAU;QACd,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;IAClE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GAAG,CAAC,CAAC;SACnF;QAED,MAAM,GAAG,CAAC;IACZ,CAAC;;AAlLH,4BA6LC;oBAvLiB,iBAAiB;AALjC;;;;GAIG;AACY,YAAmB,GAAG,CAAE,CAAA;AA8KvC;IACE,IAAI,YAAY,GAAG,CAAC,CAAC;IACrB,MAAM,EAAE,+BAA+B,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC;IACxD,IAAI,+BAA+B,KAAK,SAAS,EAAE;QACjD,YAAY,GAAG,QAAQ,CAAC,+BAA+B,EAAE,EAAE,CAAC,CAAC;QAC7D,YAAY,GAAG,CAAC,YAAY,KAAK,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;KAChF;IACD,EAAI,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;AACrC,CAAC,GAAA,CAAA"}
@@ -1,174 +0,0 @@
1
- /// <reference types="node" />
2
- import { EventEmitter } from "events";
3
- import { Instance } from "./instance";
4
- import { Location } from "./location";
5
- import { Logger } from "./logging";
6
- import { DataWithRevision, LocalRegistryPlugin, NamingServicePlugin, RatelimitServicePlugin, RegistryCategory, ServiceDataSet, ServiceRules, StatReporterPlugin } from "./plugins";
7
- import { RatelimitRule } from "./rules";
8
- import { PartialSubset } from "./utils";
9
- /**
10
- * 事件类型
11
- */
12
- export declare const enum RegistryEventType {
13
- /** 同步实例状态事件 */
14
- SyncInstanceStatus = "SyncInstanceStatus"
15
- }
16
- declare const kDefaultOptions: {
17
- /**
18
- * 过期时间
19
- * 超过此时间,会 __异步__ 请求新数据
20
- * _也就是说,返回值可能为旧数据_
21
- */
22
- expireTime: {
23
- /** 实例过期时间 */
24
- Instance: number;
25
- /** 规则过期时间 */
26
- Rule: number;
27
- /** 限流规则过期时间 */
28
- Ratelimit: number;
29
- };
30
- /**
31
- * 刷新时间
32
- * 达到此时间,会自动更新数据(如数据已过期)
33
- * _数据刷新,并不影响资源回收策略_
34
- */
35
- refreshTime: {
36
- /** 实例刷新时间 */
37
- Instance: number;
38
- /** 规则刷新时间 */
39
- Rule: number;
40
- /** 限流规则刷新时间 */
41
- Ratelimit: number;
42
- };
43
- /**
44
- * 脏数据时间
45
- * 超过此时间,会 __同步__ 请求新数据
46
- * _也就是说,返回值一定为新数据_
47
- */
48
- dirtyTime: {
49
- /** 实例脏数据时间 */
50
- Instance: number;
51
- /** 规则脏数据时间 */
52
- Rule: number;
53
- /** 限流规则脏数据时间 */
54
- Ratelimit: number;
55
- };
56
- /**
57
- * 资源回收时间
58
- * 回收条件为:_至少_经历指定的间隔都没被访问
59
- * 小于或等于 0 则为不启用此特性
60
- */
61
- recycleTime: number;
62
- /**
63
- * 服务状态上报间隔
64
- */
65
- reportInterval: number;
66
- /**
67
- * 服务状态上报阈值
68
- */
69
- reportThreshold: number;
70
- /**
71
- * 请求池最大容量
72
- * 超过此大小,且无请求时,将会进行回收
73
- */
74
- maxRequestsCapacity: number; /** v8 对于 FastProperties Slot 的上限为 18 */
75
- };
76
- declare type LocalRegistryAssembleOptions = typeof kDefaultOptions & {
77
- /**
78
- * 基础位置信息
79
- * 如果 `Naming` 返回的位置信息为空,则使用此配置
80
- */
81
- baseLocation?: Location;
82
- };
83
- export declare type LocalRegistryOptions = PartialSubset<LocalRegistryAssembleOptions, "expireTime" | "refreshTime" | "dirtyTime">;
84
- /**
85
- * 版本号变更记录
86
- */
87
- export interface RevisionLog {
88
- /**
89
- * 变更时间 (ms)
90
- */
91
- time: number;
92
- /**
93
- * 变更后版本号
94
- */
95
- revision: string;
96
- }
97
- /** 服务变更历史 */
98
- export declare type ServiceChangelog = Record<RegistryCategory, RevisionLog[]>;
99
- /**
100
- * 服务状态
101
- */
102
- export declare type CacheStat = Record<RegistryCategory, {
103
- /**
104
- * 变更历史
105
- */
106
- history: RevisionLog[];
107
- /**
108
- * 当前是否已删除(包括过期淘汰与Server删除)
109
- */
110
- eliminated: boolean;
111
- }>;
112
- export declare class LocalRegistry extends EventEmitter {
113
- private readonly logger;
114
- private readonly naming;
115
- private readonly registry;
116
- private readonly reporters;
117
- private readonly ratelimit?;
118
- private entriesMeta;
119
- private servicesMeta;
120
- private activeRequestsPool;
121
- private activeRequestsCapacity;
122
- private activeRequestsCount;
123
- private historyRecorder;
124
- private historyRecorderCount;
125
- private historyReporter;
126
- private readonly needReport;
127
- private readonly options;
128
- private disposed;
129
- constructor(logger: Logger, naming: NamingServicePlugin, registry: LocalRegistryPlugin, reporters: StatReporterPlugin[], ratelimit?: RatelimitServicePlugin | undefined, options?: Partial<LocalRegistryOptions>);
130
- get location(): Location | undefined;
131
- fetch(type: RegistryCategory.Instance, namespace: string, service: string): Promise<Instance[]>;
132
- fetch(type: RegistryCategory.Rule, namespace: string, service: string): Promise<ServiceRules>;
133
- fetch(type: RegistryCategory.Ratelimit, namespace: string, service: string): Promise<RatelimitRule[]>;
134
- fetch(type: RegistryCategory, namespace: string, service: string): Promise<ServiceRules | Instance[] | RatelimitRule[]>;
135
- local(type: RegistryCategory.Instance, namespace: string, service: string): DataWithRevision<Instance[]> | null;
136
- local(type: RegistryCategory.Rule, namespace: string, service: string): DataWithRevision<ServiceRules> | null;
137
- local(type: RegistryCategory.Ratelimit, namespace: string, service: string): DataWithRevision<RatelimitRule[]> | null;
138
- local(type: RegistryCategory, namespace: string, service: string): DataWithRevision<Instance[] | ServiceRules | RatelimitRule[]> | null;
139
- local(type: RegistryCategory.Instance): ServiceDataSet<DataWithRevision<Instance[]>>;
140
- local(type: RegistryCategory.Rule): ServiceDataSet<DataWithRevision<ServiceRules>>;
141
- local(type: RegistryCategory.Ratelimit): ServiceDataSet<DataWithRevision<RatelimitRule[]>>;
142
- local(type: RegistryCategory): ServiceDataSet<DataWithRevision<Instance[]>> | ServiceDataSet<DataWithRevision<ServiceRules>> | ServiceDataSet<DataWithRevision<RatelimitRule[]>>;
143
- dispose(): void;
144
- get isDisposed(): boolean;
145
- /** for external use only */
146
- update(type: RegistryCategory, namespace: string, service: string): Promise<boolean>;
147
- /** for internal use only */
148
- private performUpdate;
149
- private updateInstance;
150
- private updateRule;
151
- private updateRatelimit;
152
- /**
153
- * @note
154
- * 将相同的查询请求做合并(以最早发出为准)
155
- * 以减少本地名字服务无缓存情况下,对于 `Naming` 的调用压力。
156
- */
157
- private request;
158
- private pull;
159
- private report;
160
- private changelog;
161
- private cancelHistoryReporter;
162
- private accessService;
163
- private dropServiceMeta;
164
- private createServiceMeta;
165
- private dropService;
166
- private attachRefresherToEntryMeta;
167
- private attachUpdaterToEntryMeta;
168
- private releaseEntryMeta;
169
- private dropEntryMeta;
170
- private createEntries;
171
- private createEntryMeta;
172
- private getEntryMeta;
173
- }
174
- export {};