You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/12/06 15:28:28 UTC

[GitHub] [dubbo-js] fengwei5280 commented on a diff in pull request #324: megre dubbo-client invoker

fengwei5280 commented on code in PR #324:
URL: https://github.com/apache/dubbo-js/pull/324#discussion_r1041121206


##########
packages/dubbo-client/src/servicesDemo/mvpService.ts:
##########
@@ -0,0 +1,53 @@
+export interface IMvp {
+  SayHello(req: HelloRequest): Promise<HelloReply>
+  Check(req: HealthCheckRequest): Promise<HealthCheckResponse>
+}
+
+export interface DubboClientsTstubService {
+  mvp: IMvp
+}
+// define enum
+enum ServingStatus {
+  UNKNOWN = 0,
+  SERVING = 1,
+  NOT_SERVING = 2,
+  SERVICE_UNKNOWN = 3 // Used only by the Watch method.
+}
+
+// define request && response, 实际代码可以根据不同的namespace生成到不同的目录
+export interface HealthCheckResponse {
+  status: ServingStatus
+}
+
+export interface HealthCheckRequest {
+  service: string
+}
+
+export interface HelloRequest {
+  name: string
+}
+
+export interface HelloReply {
+  message: string
+}
+
+export const Mvp = {
+  SayHello: {
+    path: '/helloworld.Mvp/SayHello',
+    encode(data: HelloRequest) {
+      return ` hellorequest在对象path路径 `

Review Comment:
   好的,这里的pat好我改成:path: '/helloworld.proto/SayHello'



-- 
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-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org