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/04 14:43:58 UTC

[GitHub] [dubbo-js] fengwei5280 opened a new pull request, #324: megre dubbo-client invoker

fengwei5280 opened a new pull request, #324:
URL: https://github.com/apache/dubbo-js/pull/324

   初始化invoker


-- 
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


[GitHub] [dubbo-js] sonarcloud[bot] commented on pull request #324: megre dubbo-client invoker

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on PR #324:
URL: https://github.com/apache/dubbo-js/pull/324#issuecomment-1336429936

   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_dubbo-js&pullRequest=324)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-js&pullRequest=324&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-js&pullRequest=324&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-js&pullRequest=324&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=CODE_SMELL)
   
   [![No Coverage information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png 'No Coverage information')](https://sonarcloud.io/component_measures?id=apache_dubbo-js&pullRequest=324) No Coverage information  
   [![No Duplication information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/NoDuplicationInfo-16px.png 'No Duplication information')](https://sonarcloud.io/component_measures?id=apache_dubbo-js&pullRequest=324&metric=duplicated_lines_density&view=list) No Duplication information
   
   


-- 
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


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

Posted by GitBox <gi...@apache.org>.
fengwei5280 commented on code in PR #324:
URL: https://github.com/apache/dubbo-js/pull/324#discussion_r1041121460


##########
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路径 `
+    },
+    decode(data: any) {
+      return `helloreplay 的path路径 `
+    }
+  },
+  Check: {
+    path: '/helloworld.Mvp/Check',
+    encode(data: HealthCheckRequest) {
+      return ` HealthCheckRequest在对象path路径 `

Review Comment:
   同上



-- 
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


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

Posted by GitBox <gi...@apache.org>.
songjiachao commented on code in PR #324:
URL: https://github.com/apache/dubbo-js/pull/324#discussion_r1039327505


##########
example/hello/hello-web/server.ts:
##########
@@ -0,0 +1,2 @@
+import { DubboClient } from '@apache/dubbo3-client'

Review Comment:
   consumer写的是:import { Dubbo } from 'dubbo3-client'
   server 这里写的是:import { DubboClient } from '@apache/dubbo3-client'
   
   是不是有一个不对呀



##########
example/hello/hello-web/consumer/index.ts:
##########
@@ -0,0 +1,27 @@
+import { Dubbo } from 'dubbo3-client'
+
+export interface IHelloService {
+  sayHello(
+    id:number,
+    name:string,
+    email:string,
+    password:string
+  ):Promise<string>
+
+  getUser(id:number):Promise<string>
+}
+
+export const HelloService = (b:Dubbo):IHelloService => {
+  b.proxyService({
+    name:'HelloService',
+    methods:{
+      sayHello( id:number, name:string,email:string, password:string){
+        return [id, name, email, password]

Review Comment:
   这里返回值类型是数组和上面定义的Promise<string>不对应吧
   



-- 
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


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

Posted by GitBox <gi...@apache.org>.
wawIsready commented on code in PR #324:
URL: https://github.com/apache/dubbo-js/pull/324#discussion_r1040346349


##########
example/hello/hello-web/consumer/index.ts:
##########
@@ -0,0 +1,27 @@
+import { Dubbo } from 'dubbo3-client'
+
+export interface IHelloService {
+  sayHello(
+    id:number,
+    name:string,
+    email:string,
+    password:string
+  ):Promise<string>
+
+  getUser(id:number):Promise<string>
+}
+
+export const HelloService = (b:Dubbo):IHelloService => {
+  b.proxyService({
+    name:'HelloService',
+    methods:{
+      sayHello( id:number, name:string,email:string, password:string){
+        return [id, name, email, password]

Review Comment:
   对,我修改下这个示例



-- 
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


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

Posted by GitBox <gi...@apache.org>.
hufeng commented on code in PR #324:
URL: https://github.com/apache/dubbo-js/pull/324#discussion_r1039296701


##########
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:
   这个改成目前mvp prot的路径



##########
packages/dubbo-client/src/types.ts:
##########
@@ -0,0 +1,23 @@
+export type TServiceName = string
+export type TConsumerUrl = string
+
+export interface IDubboProps {
+  // path
+  path: string

Review Comment:
   这个path是啥意思?proto的path吗?如果是应该protoPath



##########
packages/dubbo-client/src/context.ts:
##########
@@ -0,0 +1,38 @@
+export default class Context {
+  path: string
+  method: Function
+  args: Array<any>
+  // final result
+  body: any
+  request: any
+  constructor() {
+    this.path = ''
+    this.method = new Function()
+    this.args = []
+    this.body = {
+      res: {},
+      err: null
+    }
+    this.request = {
+      requestId: 12
+    }
+  }
+
+  getPath() {
+    return this.path
+  }
+
+  setPath(path: string) {
+    this.path = path

Review Comment:
   set方法返回this



##########
packages/dubbo-client/src/context.ts:
##########
@@ -0,0 +1,38 @@
+export default class Context {
+  path: string
+  method: Function
+  args: Array<any>
+  // final result
+  body: any
+  request: any
+  constructor() {
+    this.path = ''
+    this.method = new Function()

Review Comment:
   this.method = () => {}



##########
packages/dubbo-client/src/types.ts:
##########
@@ -0,0 +1,23 @@
+export type TServiceName = string
+export type TConsumerUrl = string
+
+export interface IDubboProps {
+  // path
+  path: string
+  //注册到dubbo容器服务对象
+  services: { [name: string]: any }
+}
+
+export type IDubboMethod = {
+  path: string
+  method: Function
+}
+
+export interface IDubboService {
+  path: string
+  methods: Object
+}
+
+export type TDubboService<T> = {

Review Comment:
   应该不需要了



##########
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路径 `
+    },
+    decode(data: any) {
+      return `helloreplay 的path路径 `
+    }
+  },
+  Check: {
+    path: '/helloworld.Mvp/Check',
+    encode(data: HealthCheckRequest) {
+      return ` HealthCheckRequest在对象path路径 `

Review Comment:
   改成mvp proto的路径



##########
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路径 `
+    },
+    decode(data: any) {
+      return `helloreplay 的path路径 `
+    }
+  },
+  Check: {
+    path: '/helloworld.Mvp/Check',
+    encode(data: HealthCheckRequest) {
+      return ` HealthCheckRequest在对象path路径 `
+    },
+    decode(data: any) {
+      return `helloreplay 的path路径 `

Review Comment:
   同上



##########
packages/dubbo-client/src/context.ts:
##########
@@ -0,0 +1,38 @@
+export default class Context {
+  path: string

Review Comment:
   添加private关键字



##########
packages/dubbo-client/src/context.ts:
##########
@@ -0,0 +1,38 @@
+export default class Context {
+  path: string
+  method: Function
+  args: Array<any>
+  // final result
+  body: any
+  request: any
+  constructor() {
+    this.path = ''
+    this.method = new Function()
+    this.args = []
+    this.body = {
+      res: {},
+      err: null
+    }
+    this.request = {
+      requestId: 12

Review Comment:
   暂时不需要



##########
packages/dubbo-client/src/types.ts:
##########
@@ -0,0 +1,23 @@
+export type TServiceName = string

Review Comment:
   不需要的类型 去掉



-- 
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


[GitHub] [dubbo-js] sonarcloud[bot] commented on pull request #324: megre dubbo-client invoker

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on PR #324:
URL: https://github.com/apache/dubbo-js/pull/324#issuecomment-1339536231

   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_dubbo-js&pullRequest=324)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-js&pullRequest=324&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-js&pullRequest=324&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-js&pullRequest=324&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=CODE_SMELL)
   
   [![No Coverage information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png 'No Coverage information')](https://sonarcloud.io/component_measures?id=apache_dubbo-js&pullRequest=324) No Coverage information  
   [![No Duplication information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/NoDuplicationInfo-16px.png 'No Duplication information')](https://sonarcloud.io/component_measures?id=apache_dubbo-js&pullRequest=324&metric=duplicated_lines_density&view=list) No Duplication information
   
   


-- 
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


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

Posted by GitBox <gi...@apache.org>.
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


[GitHub] [dubbo-js] hufeng merged pull request #324: megre dubbo-client invoker

Posted by GitBox <gi...@apache.org>.
hufeng merged PR #324:
URL: https://github.com/apache/dubbo-js/pull/324


-- 
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


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

Posted by GitBox <gi...@apache.org>.
fengwei5280 commented on code in PR #324:
URL: https://github.com/apache/dubbo-js/pull/324#discussion_r1051387437


##########
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:
   直接改为路径地址返回



-- 
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


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

Posted by GitBox <gi...@apache.org>.
fengwei5280 commented on code in PR #324:
URL: https://github.com/apache/dubbo-js/pull/324#discussion_r1059228262


##########
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) {

Review Comment:
   是的,这块我改下
   



-- 
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


[GitHub] [dubbo-js] sonarcloud[bot] commented on pull request #324: megre dubbo-client invoker

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on PR #324:
URL: https://github.com/apache/dubbo-js/pull/324#issuecomment-1339429273

   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_dubbo-js&pullRequest=324)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-js&pullRequest=324&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-js&pullRequest=324&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-js&pullRequest=324&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=CODE_SMELL)
   
   [![No Coverage information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png 'No Coverage information')](https://sonarcloud.io/component_measures?id=apache_dubbo-js&pullRequest=324) No Coverage information  
   [![No Duplication information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/NoDuplicationInfo-16px.png 'No Duplication information')](https://sonarcloud.io/component_measures?id=apache_dubbo-js&pullRequest=324&metric=duplicated_lines_density&view=list) No Duplication information
   
   


-- 
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


[GitHub] [dubbo-js] sonarcloud[bot] commented on pull request #324: megre dubbo-client invoker

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on PR #324:
URL: https://github.com/apache/dubbo-js/pull/324#issuecomment-1361348653

   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_dubbo-js&pullRequest=324)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-js&pullRequest=324&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-js&pullRequest=324&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-js&pullRequest=324&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_dubbo-js&pullRequest=324&resolved=false&types=CODE_SMELL)
   
   [![No Coverage information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png 'No Coverage information')](https://sonarcloud.io/component_measures?id=apache_dubbo-js&pullRequest=324) No Coverage information  
   [![No Duplication information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/NoDuplicationInfo-16px.png 'No Duplication information')](https://sonarcloud.io/component_measures?id=apache_dubbo-js&pullRequest=324&metric=duplicated_lines_density&view=list) No Duplication information
   
   


-- 
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


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

Posted by GitBox <gi...@apache.org>.
hufeng commented on code in PR #324:
URL: https://github.com/apache/dubbo-js/pull/324#discussion_r1058837129


##########
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) {

Review Comment:
   这里返回路径,是不是data就不需要了 ~~



##########
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) {

Review Comment:
   其他的类似问题



-- 
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


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

Posted by GitBox <gi...@apache.org>.
wawIsready commented on code in PR #324:
URL: https://github.com/apache/dubbo-js/pull/324#discussion_r1040339535


##########
example/hello/hello-web/server.ts:
##########
@@ -0,0 +1,2 @@
+import { DubboClient } from '@apache/dubbo3-client'

Review Comment:
   @fengwei5280  这里我们统一一下把。



-- 
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


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

Posted by GitBox <gi...@apache.org>.
wawIsready commented on code in PR #324:
URL: https://github.com/apache/dubbo-js/pull/324#discussion_r1040346029


##########
packages/dubbo-client/src/types.ts:
##########
@@ -0,0 +1,23 @@
+export type TServiceName = string

Review Comment:
   types 没删干净,我统一处理下



##########
packages/dubbo-client/src/context.ts:
##########
@@ -0,0 +1,38 @@
+export default class Context {
+  path: string

Review Comment:
   我统一处理下 context 



-- 
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