endpoints_config.go 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505
  1. package endpoints
  2. import (
  3. "encoding/json"
  4. "fmt"
  5. "sync"
  6. )
  7. const endpointsJson = "{" +
  8. " \"products\":[" +
  9. " {" +
  10. " \"code\": \"aegis\"," +
  11. " \"document_id\": \"28449\"," +
  12. " \"location_service_code\": \"vipaegis\"," +
  13. " \"regional_endpoints\": []," +
  14. " \"global_endpoint\": \"aegis.cn-hangzhou.aliyuncs.com\"," +
  15. " \"regional_endpoint_pattern\": \"\"" +
  16. " }," +
  17. " {" +
  18. " \"code\": \"alidns\"," +
  19. " \"document_id\": \"29739\"," +
  20. " \"location_service_code\": \"alidns\"," +
  21. " \"regional_endpoints\": []," +
  22. " \"global_endpoint\": \"alidns.aliyuncs.com\"," +
  23. " \"regional_endpoint_pattern\": \"\"" +
  24. " }," +
  25. " {" +
  26. " \"code\": \"arms\"," +
  27. " \"document_id\": \"42924\"," +
  28. " \"location_service_code\": \"\"," +
  29. " \"regional_endpoints\": [ {" +
  30. " \"region\": \"ap-southeast-1\"," +
  31. " \"endpoint\": \"arms.ap-southeast-1.aliyuncs.com\"" +
  32. " }, {" +
  33. " \"region\": \"cn-beijing\"," +
  34. " \"endpoint\": \"arms.cn-beijing.aliyuncs.com\"" +
  35. " }, {" +
  36. " \"region\": \"cn-hangzhou\"," +
  37. " \"endpoint\": \"arms.cn-hangzhou.aliyuncs.com\"" +
  38. " }, {" +
  39. " \"region\": \"cn-hongkong\"," +
  40. " \"endpoint\": \"arms.cn-hongkong.aliyuncs.com\"" +
  41. " }, {" +
  42. " \"region\": \"cn-qingdao\"," +
  43. " \"endpoint\": \"arms.cn-qingdao.aliyuncs.com\"" +
  44. " }, {" +
  45. " \"region\": \"cn-shanghai\"," +
  46. " \"endpoint\": \"arms.cn-shanghai.aliyuncs.com\"" +
  47. " }, {" +
  48. " \"region\": \"cn-shenzhen\"," +
  49. " \"endpoint\": \"arms.cn-shenzhen.aliyuncs.com\"" +
  50. " }]," +
  51. " \"global_endpoint\": \"\"," +
  52. " \"regional_endpoint_pattern\": \"arms.[RegionId].aliyuncs.com\"" +
  53. " }," +
  54. " {" +
  55. " \"code\": \"batchcompute\"," +
  56. " \"document_id\": \"44717\"," +
  57. " \"location_service_code\": \"\"," +
  58. " \"regional_endpoints\": [ {" +
  59. " \"region\": \"ap-southeast-1\"," +
  60. " \"endpoint\": \"batchcompute.ap-southeast-1.aliyuncs.com\"" +
  61. " }, {" +
  62. " \"region\": \"cn-beijing\"," +
  63. " \"endpoint\": \"batchcompute.cn-beijing.aliyuncs.com\"" +
  64. " }, {" +
  65. " \"region\": \"cn-hangzhou\"," +
  66. " \"endpoint\": \"batchcompute.cn-hangzhou.aliyuncs.com\"" +
  67. " }, {" +
  68. " \"region\": \"cn-huhehaote\"," +
  69. " \"endpoint\": \"batchcompute.cn-huhehaote.aliyuncs.com\"" +
  70. " }, {" +
  71. " \"region\": \"cn-qingdao\"," +
  72. " \"endpoint\": \"batchcompute.cn-qingdao.aliyuncs.com\"" +
  73. " }, {" +
  74. " \"region\": \"cn-shanghai\"," +
  75. " \"endpoint\": \"batchcompute.cn-shanghai.aliyuncs.com\"" +
  76. " }, {" +
  77. " \"region\": \"cn-shenzhen\"," +
  78. " \"endpoint\": \"batchcompute.cn-shenzhen.aliyuncs.com\"" +
  79. " }, {" +
  80. " \"region\": \"cn-zhangjiakou\"," +
  81. " \"endpoint\": \"batchcompute.cn-zhangjiakou.aliyuncs.com\"" +
  82. " }, {" +
  83. " \"region\": \"us-west-1\"," +
  84. " \"endpoint\": \"batchcompute.us-west-1.aliyuncs.com\"" +
  85. " }]," +
  86. " \"global_endpoint\": \"\"," +
  87. " \"regional_endpoint_pattern\": \"batchcompute.[RegionId].aliyuncs.com\"" +
  88. " }," +
  89. " {" +
  90. " \"code\": \"ccc\"," +
  91. " \"document_id\": \"63027\"," +
  92. " \"location_service_code\": \"ccc\"," +
  93. " \"regional_endpoints\": [ {" +
  94. " \"region\": \"cn-hangzhou\"," +
  95. " \"endpoint\": \"ccc.cn-hangzhou.aliyuncs.com\"" +
  96. " }, {" +
  97. " \"region\": \"cn-shanghai\"," +
  98. " \"endpoint\": \"ccc.cn-shanghai.aliyuncs.com\"" +
  99. " }]," +
  100. " \"global_endpoint\": \"\"," +
  101. " \"regional_endpoint_pattern\": \"ccc.[RegionId].aliyuncs.com\"" +
  102. " }," +
  103. " {" +
  104. " \"code\": \"cdn\"," +
  105. " \"document_id\": \"27148\"," +
  106. " \"location_service_code\": \"\"," +
  107. " \"regional_endpoints\": []," +
  108. " \"global_endpoint\": \"cdn.aliyuncs.com\"," +
  109. " \"regional_endpoint_pattern\": \"\"" +
  110. " }," +
  111. " {" +
  112. " \"code\": \"cds\"," +
  113. " \"document_id\": \"62887\"," +
  114. " \"location_service_code\": \"\"," +
  115. " \"regional_endpoints\": []," +
  116. " \"global_endpoint\": \"cds.cn-beijing.aliyuncs.com\"," +
  117. " \"regional_endpoint_pattern\": \"\"" +
  118. " }," +
  119. " {" +
  120. " \"code\": \"chatbot\"," +
  121. " \"document_id\": \"60760\"," +
  122. " \"location_service_code\": \"beebot\"," +
  123. " \"regional_endpoints\": []," +
  124. " \"global_endpoint\": \"\"," +
  125. " \"regional_endpoint_pattern\": \"chatbot.[RegionId].aliyuncs.com\"" +
  126. " }," +
  127. " {" +
  128. " \"code\": \"cloudapi\"," +
  129. " \"document_id\": \"43590\"," +
  130. " \"location_service_code\": \"apigateway\"," +
  131. " \"regional_endpoints\": [ {" +
  132. " \"region\": \"ap-northeast-1\"," +
  133. " \"endpoint\": \"apigateway.ap-northeast-1.aliyuncs.com\"" +
  134. " }, {" +
  135. " \"region\": \"us-west-1\"," +
  136. " \"endpoint\": \"apigateway.us-west-1.aliyuncs.com\"" +
  137. " }]," +
  138. " \"global_endpoint\": \"\"," +
  139. " \"regional_endpoint_pattern\": \"apigateway.[RegionId].aliyuncs.com\"" +
  140. " }," +
  141. " {" +
  142. " \"code\": \"cloudauth\"," +
  143. " \"document_id\": \"60687\"," +
  144. " \"location_service_code\": \"cloudauth\"," +
  145. " \"regional_endpoints\": []," +
  146. " \"global_endpoint\": \"cloudauth.aliyuncs.com\"," +
  147. " \"regional_endpoint_pattern\": \"\"" +
  148. " }," +
  149. " {" +
  150. " \"code\": \"cloudphoto\"," +
  151. " \"document_id\": \"59902\"," +
  152. " \"location_service_code\": \"cloudphoto\"," +
  153. " \"regional_endpoints\": []," +
  154. " \"global_endpoint\": \"\"," +
  155. " \"regional_endpoint_pattern\": \"cloudphoto.[RegionId].aliyuncs.com\"" +
  156. " }," +
  157. " {" +
  158. " \"code\": \"cloudwf\"," +
  159. " \"document_id\": \"58111\"," +
  160. " \"location_service_code\": \"\"," +
  161. " \"regional_endpoints\": []," +
  162. " \"global_endpoint\": \"cloudwf.aliyuncs.com\"," +
  163. " \"regional_endpoint_pattern\": \"\"" +
  164. " }," +
  165. " {" +
  166. " \"code\": \"cms\"," +
  167. " \"document_id\": \"28615\"," +
  168. " \"location_service_code\": \"cms\"," +
  169. " \"regional_endpoints\": []," +
  170. " \"global_endpoint\": \"\"," +
  171. " \"regional_endpoint_pattern\": \"\"" +
  172. " }," +
  173. " {" +
  174. " \"code\": \"cr\"," +
  175. " \"document_id\": \"60716\"," +
  176. " \"location_service_code\": \"\"," +
  177. " \"regional_endpoints\": []," +
  178. " \"global_endpoint\": \"cr.aliyuncs.com\"," +
  179. " \"regional_endpoint_pattern\": \"\"" +
  180. " }," +
  181. " {" +
  182. " \"code\": \"cs\"," +
  183. " \"document_id\": \"26043\"," +
  184. " \"location_service_code\": \"\"," +
  185. " \"regional_endpoints\": []," +
  186. " \"global_endpoint\": \"cs.aliyuncs.com\"," +
  187. " \"regional_endpoint_pattern\": \"\"" +
  188. " }," +
  189. " {" +
  190. " \"code\": \"csb\"," +
  191. " \"document_id\": \"64837\"," +
  192. " \"location_service_code\": \"\"," +
  193. " \"regional_endpoints\": [ {" +
  194. " \"region\": \"cn-beijing\"," +
  195. " \"endpoint\": \"csb.cn-beijing.aliyuncs.com\"" +
  196. " }, {" +
  197. " \"region\": \"cn-hangzhou\"," +
  198. " \"endpoint\": \"csb.cn-hangzhou.aliyuncs.com\"" +
  199. " }]," +
  200. " \"global_endpoint\": \"\"," +
  201. " \"regional_endpoint_pattern\": \"csb.[RegionId].aliyuncs.com\"" +
  202. " }," +
  203. " {" +
  204. " \"code\": \"dds\"," +
  205. " \"document_id\": \"61715\"," +
  206. " \"location_service_code\": \"dds\"," +
  207. " \"regional_endpoints\": []," +
  208. " \"global_endpoint\": \"mongodb.aliyuncs.com\"," +
  209. " \"regional_endpoint_pattern\": \"mongodb.[RegionId].aliyuncs.com\"" +
  210. " }," +
  211. " {" +
  212. " \"code\": \"dm\"," +
  213. " \"document_id\": \"29434\"," +
  214. " \"location_service_code\": \"\"," +
  215. " \"regional_endpoints\": [ {" +
  216. " \"region\": \"ap-southeast-1\"," +
  217. " \"endpoint\": \"dm.aliyuncs.com\"" +
  218. " }, {" +
  219. " \"region\": \"ap-southeast-2\"," +
  220. " \"endpoint\": \"dm.ap-southeast-2.aliyuncs.com\"" +
  221. " }, {" +
  222. " \"region\": \"cn-beijing\"," +
  223. " \"endpoint\": \"dm.aliyuncs.com\"" +
  224. " }, {" +
  225. " \"region\": \"cn-hangzhou\"," +
  226. " \"endpoint\": \"dm.aliyuncs.com\"" +
  227. " }, {" +
  228. " \"region\": \"cn-hongkong\"," +
  229. " \"endpoint\": \"dm.aliyuncs.com\"" +
  230. " }, {" +
  231. " \"region\": \"cn-qingdao\"," +
  232. " \"endpoint\": \"dm.aliyuncs.com\"" +
  233. " }, {" +
  234. " \"region\": \"cn-shanghai\"," +
  235. " \"endpoint\": \"dm.aliyuncs.com\"" +
  236. " }, {" +
  237. " \"region\": \"cn-shenzhen\"," +
  238. " \"endpoint\": \"dm.aliyuncs.com\"" +
  239. " }, {" +
  240. " \"region\": \"us-east-1\"," +
  241. " \"endpoint\": \"dm.aliyuncs.com\"" +
  242. " }, {" +
  243. " \"region\": \"us-west-1\"," +
  244. " \"endpoint\": \"dm.aliyuncs.com\"" +
  245. " }]," +
  246. " \"global_endpoint\": \"dm.aliyuncs.com\"," +
  247. " \"regional_endpoint_pattern\": \"dm.[RegionId].aliyuncs.com\"" +
  248. " }," +
  249. " {" +
  250. " \"code\": \"domain\"," +
  251. " \"document_id\": \"42875\"," +
  252. " \"location_service_code\": \"\"," +
  253. " \"regional_endpoints\": []," +
  254. " \"global_endpoint\": \"domain.aliyuncs.com\"," +
  255. " \"regional_endpoint_pattern\": \"domain.aliyuncs.com\"" +
  256. " }," +
  257. " {" +
  258. " \"code\": \"domain-intl\"," +
  259. " \"document_id\": \"\"," +
  260. " \"location_service_code\": \"\"," +
  261. " \"regional_endpoints\": []," +
  262. " \"global_endpoint\": \"domain-intl.aliyuncs.com\"," +
  263. " \"regional_endpoint_pattern\": \"domain-intl.aliyuncs.com\"" +
  264. " }," +
  265. " {" +
  266. " \"code\": \"drds\"," +
  267. " \"document_id\": \"51111\"," +
  268. " \"location_service_code\": \"\"," +
  269. " \"regional_endpoints\": []," +
  270. " \"global_endpoint\": \"drds.aliyuncs.com\"," +
  271. " \"regional_endpoint_pattern\": \"drds.aliyuncs.com\"" +
  272. " }," +
  273. " {" +
  274. " \"code\": \"ecs\"," +
  275. " \"document_id\": \"25484\"," +
  276. " \"location_service_code\": \"ecs\"," +
  277. " \"regional_endpoints\": []," +
  278. " \"global_endpoint\": \"\"," +
  279. " \"regional_endpoint_pattern\": \"\"" +
  280. " }," +
  281. " {" +
  282. " \"code\": \"emr\"," +
  283. " \"document_id\": \"28140\"," +
  284. " \"location_service_code\": \"emr\"," +
  285. " \"regional_endpoints\": []," +
  286. " \"global_endpoint\": \"\"," +
  287. " \"regional_endpoint_pattern\": \"emr.[RegionId].aliyuncs.com\"" +
  288. " }," +
  289. " {" +
  290. " \"code\": \"ess\"," +
  291. " \"document_id\": \"25925\"," +
  292. " \"location_service_code\": \"ess\"," +
  293. " \"regional_endpoints\": []," +
  294. " \"global_endpoint\": \"\"," +
  295. " \"regional_endpoint_pattern\": \"ess.[RegionId].aliyuncs.com\"" +
  296. " }," +
  297. " {" +
  298. " \"code\": \"green\"," +
  299. " \"document_id\": \"28427\"," +
  300. " \"location_service_code\": \"green\"," +
  301. " \"regional_endpoints\": []," +
  302. " \"global_endpoint\": \"green.aliyuncs.com\"," +
  303. " \"regional_endpoint_pattern\": \"\"" +
  304. " }," +
  305. " {" +
  306. " \"code\": \"hpc\"," +
  307. " \"document_id\": \"35201\"," +
  308. " \"location_service_code\": \"hpc\"," +
  309. " \"regional_endpoints\": []," +
  310. " \"global_endpoint\": \"hpc.aliyuncs.com\"," +
  311. " \"regional_endpoint_pattern\": \"\"" +
  312. " }," +
  313. " {" +
  314. " \"code\": \"httpdns\"," +
  315. " \"document_id\": \"52679\"," +
  316. " \"location_service_code\": \"\"," +
  317. " \"regional_endpoints\": []," +
  318. " \"global_endpoint\": \"httpdns-api.aliyuncs.com\"," +
  319. " \"regional_endpoint_pattern\": \"\"" +
  320. " }," +
  321. " {" +
  322. " \"code\": \"iot\"," +
  323. " \"document_id\": \"30557\"," +
  324. " \"location_service_code\": \"iot\"," +
  325. " \"regional_endpoints\": []," +
  326. " \"global_endpoint\": \"\"," +
  327. " \"regional_endpoint_pattern\": \"iot.[RegionId].aliyuncs.com\"" +
  328. " }," +
  329. " {" +
  330. " \"code\": \"itaas\"," +
  331. " \"document_id\": \"55759\"," +
  332. " \"location_service_code\": \"\"," +
  333. " \"regional_endpoints\": []," +
  334. " \"global_endpoint\": \"itaas.aliyuncs.com\"," +
  335. " \"regional_endpoint_pattern\": \"\"" +
  336. " }," +
  337. " {" +
  338. " \"code\": \"jaq\"," +
  339. " \"document_id\": \"35037\"," +
  340. " \"location_service_code\": \"\"," +
  341. " \"regional_endpoints\": []," +
  342. " \"global_endpoint\": \"jaq.aliyuncs.com\"," +
  343. " \"regional_endpoint_pattern\": \"\"" +
  344. " }," +
  345. " {" +
  346. " \"code\": \"live\"," +
  347. " \"document_id\": \"48207\"," +
  348. " \"location_service_code\": \"live\"," +
  349. " \"regional_endpoints\": []," +
  350. " \"global_endpoint\": \"live.aliyuncs.com\"," +
  351. " \"regional_endpoint_pattern\": \"\"" +
  352. " }," +
  353. " {" +
  354. " \"code\": \"mts\"," +
  355. " \"document_id\": \"29212\"," +
  356. " \"location_service_code\": \"mts\"," +
  357. " \"regional_endpoints\": []," +
  358. " \"global_endpoint\": \"\"," +
  359. " \"regional_endpoint_pattern\": \"\"" +
  360. " }," +
  361. " {" +
  362. " \"code\": \"nas\"," +
  363. " \"document_id\": \"62598\"," +
  364. " \"location_service_code\": \"nas\"," +
  365. " \"regional_endpoints\": []," +
  366. " \"global_endpoint\": \"\"," +
  367. " \"regional_endpoint_pattern\": \"\"" +
  368. " }," +
  369. " {" +
  370. " \"code\": \"ons\"," +
  371. " \"document_id\": \"44416\"," +
  372. " \"location_service_code\": \"ons\"," +
  373. " \"regional_endpoints\": []," +
  374. " \"global_endpoint\": \"\"," +
  375. " \"regional_endpoint_pattern\": \"\"" +
  376. " }," +
  377. " {" +
  378. " \"code\": \"polardb\"," +
  379. " \"document_id\": \"58764\"," +
  380. " \"location_service_code\": \"polardb\"," +
  381. " \"regional_endpoints\": [ {" +
  382. " \"region\": \"ap-south-1\"," +
  383. " \"endpoint\": \"polardb.ap-south-1.aliyuncs.com\"" +
  384. " }, {" +
  385. " \"region\": \"ap-southeast-5\"," +
  386. " \"endpoint\": \"polardb.ap-southeast-5.aliyuncs.com\"" +
  387. " }]," +
  388. " \"global_endpoint\": \"\"," +
  389. " \"regional_endpoint_pattern\": \"polardb.aliyuncs.com\"" +
  390. " }," +
  391. " {" +
  392. " \"code\": \"push\"," +
  393. " \"document_id\": \"30074\"," +
  394. " \"location_service_code\": \"\"," +
  395. " \"regional_endpoints\": []," +
  396. " \"global_endpoint\": \"cloudpush.aliyuncs.com\"," +
  397. " \"regional_endpoint_pattern\": \"\"" +
  398. " }," +
  399. " {" +
  400. " \"code\": \"qualitycheck\"," +
  401. " \"document_id\": \"50807\"," +
  402. " \"location_service_code\": \"\"," +
  403. " \"regional_endpoints\": [ {" +
  404. " \"region\": \"cn-hangzhou\"," +
  405. " \"endpoint\": \"qualitycheck.cn-hangzhou.aliyuncs.com\"" +
  406. " }]," +
  407. " \"global_endpoint\": \"\"," +
  408. " \"regional_endpoint_pattern\": \"\"" +
  409. " }," +
  410. " {" +
  411. " \"code\": \"r-kvstore\"," +
  412. " \"document_id\": \"60831\"," +
  413. " \"location_service_code\": \"redisa\"," +
  414. " \"regional_endpoints\": []," +
  415. " \"global_endpoint\": \"\"," +
  416. " \"regional_endpoint_pattern\": \"\"" +
  417. " }," +
  418. " {" +
  419. " \"code\": \"ram\"," +
  420. " \"document_id\": \"28672\"," +
  421. " \"location_service_code\": \"\"," +
  422. " \"regional_endpoints\": []," +
  423. " \"global_endpoint\": \"ram.aliyuncs.com\"," +
  424. " \"regional_endpoint_pattern\": \"\"" +
  425. " }," +
  426. " {" +
  427. " \"code\": \"rds\"," +
  428. " \"document_id\": \"26223\"," +
  429. " \"location_service_code\": \"rds\"," +
  430. " \"regional_endpoints\": []," +
  431. " \"global_endpoint\": \"\"," +
  432. " \"regional_endpoint_pattern\": \"\"" +
  433. " }," +
  434. " {" +
  435. " \"code\": \"ros\"," +
  436. " \"document_id\": \"28899\"," +
  437. " \"location_service_code\": \"\"," +
  438. " \"regional_endpoints\": []," +
  439. " \"global_endpoint\": \"ros.aliyuncs.com\"," +
  440. " \"regional_endpoint_pattern\": \"\"" +
  441. " }," +
  442. " {" +
  443. " \"code\": \"sas-api\"," +
  444. " \"document_id\": \"28498\"," +
  445. " \"location_service_code\": \"sas\"," +
  446. " \"regional_endpoints\": []," +
  447. " \"global_endpoint\": \"\"," +
  448. " \"regional_endpoint_pattern\": \"\"" +
  449. " }," +
  450. " {" +
  451. " \"code\": \"slb\"," +
  452. " \"document_id\": \"27565\"," +
  453. " \"location_service_code\": \"slb\"," +
  454. " \"regional_endpoints\": []," +
  455. " \"global_endpoint\": \"\"," +
  456. " \"regional_endpoint_pattern\": \"\"" +
  457. " }," +
  458. " {" +
  459. " \"code\": \"sts\"," +
  460. " \"document_id\": \"28756\"," +
  461. " \"location_service_code\": \"\"," +
  462. " \"regional_endpoints\": []," +
  463. " \"global_endpoint\": \"sts.aliyuncs.com\"," +
  464. " \"regional_endpoint_pattern\": \"\"" +
  465. " }," +
  466. " {" +
  467. " \"code\": \"vod\"," +
  468. " \"document_id\": \"60574\"," +
  469. " \"location_service_code\": \"vod\"," +
  470. " \"regional_endpoints\": []," +
  471. " \"global_endpoint\": \"\"," +
  472. " \"regional_endpoint_pattern\": \"\"" +
  473. " }," +
  474. " {" +
  475. " \"code\": \"vpc\"," +
  476. " \"document_id\": \"34962\"," +
  477. " \"location_service_code\": \"vpc\"," +
  478. " \"regional_endpoints\": []," +
  479. " \"global_endpoint\": \"\"," +
  480. " \"regional_endpoint_pattern\": \"\"" +
  481. " }," +
  482. " {" +
  483. " \"code\": \"waf\"," +
  484. " \"document_id\": \"62847\"," +
  485. " \"location_service_code\": \"waf\"," +
  486. " \"regional_endpoints\": []," +
  487. " \"global_endpoint\": \"\"," +
  488. " \"regional_endpoint_pattern\": \"\"" +
  489. " }]" +
  490. "}"
  491. var initOnce sync.Once
  492. var data interface{}
  493. func getEndpointConfigData() interface{} {
  494. initOnce.Do(func() {
  495. err := json.Unmarshal([]byte(endpointsJson), &data)
  496. if err != nil {
  497. panic(fmt.Sprintf("init endpoint config data failed. %s", err))
  498. }
  499. })
  500. return data
  501. }