apache / apache/dubbo-js

支持脱离 IDL 的开发模式

Open
#345 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
776
Forks
157
PR merge metrics
No merged PRs in 30d

Description

![image](https://github.com/apache/dubbo-js/assets/18097545/2069333c-d24e-4cb3-8405-b8b2d3b4180c)

除了以上api之外,我们可以考虑引入新的api,让用户把service、method、arguments(json)直接输入进来,发起调用,比如,举个例子:

对于IDL生成的ExampleService

```typescript
export const ExampleService = {
typeName: "apache.dubbo.demo.example.v1.ExampleService",
methods: {
/**
* @generated from rpc apache.dubbo.demo.example.v1.ExampleService.Say
*/
say: {
name: "Say",
I: SayRequest,
O: SayResponse,
kind: MethodKind.Unary,
},
}
} as const;
```

我们可以引入 API
const client = createGenericPromiseClient(transport);
client.call("apache.dubbo.demo.example.v1.ExampleService", "say", {sentence:hello})

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.