ããtransport clientå å½ESé群åä½ çåºç¨ç´æ¥çéä¿¡å±ï¼å®ç¥éAPIï¼å¹¶ä¸è½å¤å¨èç¹é´èªå¨è½®å¾ªãå¸®ä½ å æ¢é群ççãä½æ¯å®å¨é群å¤é¨ï¼ç±»ä¼¼REST客æ·ç«¯ã
ããNode Clientï¼å¦ä¸æ¹é¢ï¼äºå®ä¸æ¯é群ä¸çä¸ä¸ªèç¹ï¼ä½æ¯ä¸åå¨æ°æ®ï¼å¹¶ä¸ä¸è½ä½ä¸ºä¸»èç¹ï¼ï¼ç±äºå®æ¯ä¸ä¸ªèç¹ï¼å®ç¥éæ´ä¸ªé群çç¶æï¼å ¨é¨èç¹é½å¨åªï¼åªäºåçå¨åªäºèç¹ä¸ççï¼ï¼è¿æå³çå®æ§è¡APIæ¶å¯ä»¥å°ç¨ä¸ä¸ªç½ç»è·³è·ã
ããè¿éæä¸¤ä¸ªå ³äºè¿ä¸¤ç§å®¢æ·ç«¯ç使ç¨æ¡ä¾ï¼
ãã1.å¦æä½ æ³è®©ä½ çåºç¨åé群å离ï¼transport clientæ¯ä¸ä¸ªçæ³çéæ©ãä¾å¦ï¼å¦æä½ çé群快éå建åéæ¯è¿æ¥ï¼é£ä¹transport clientæ¯node clientè½»å¾å¤ï¼å 为å®ä¸æ¯é群çä¸é¨åã
ããåæ ·ï¼å¦æä½ éè¦å建ä¸å个è¿æ¥ï¼ä½æ¯ä½ ä¸å¸ææä¸å个node clientå å ¥ä½ çé群ï¼transport clientå°æ¯ä¸ä¸ªæ´å¥½çéæ©ã
ãã2.å¨å¦ä¸æ¹é¢ï¼å¦æä½ åªéè¦å 个é¿å¯¿å½çï¼è½æä¹ æ对象è¿æ¥å°é群ï¼node clientä¼æ´é«æä¸ç¹ï¼å 为å®ç¥éé群çç»æãä½æ¯å®æä½ çåºç¨ç»å®å°é群ä¸ï¼æ以ä»é²ç«å¢çè§åº¦è¯´å¯è½ä¼é æé®é¢ã
ãã