Skip to content

Commit

Permalink
feat: add rpc stream type (#249)
Browse files Browse the repository at this point in the history
<!--
Thank you for your pull request. Please review below requirements.
Bug fixes and new features should include tests and possibly benchmarks.
Contributors guide:
https://github.com/eggjs/egg/blob/master/CONTRIBUTING.md

感谢您贡献代码。请确认下列 checklist 的完成情况。
Bug 修复和新功能必须包含测试,必要时请附上性能测试。
Contributors guide:
https://github.com/eggjs/egg/blob/master/CONTRIBUTING.md
-->

##### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to
[x]. -->

- [ ] `npm test` passes
- [ ] tests and/or benchmarks are included
- [ ] documentation is changed or added
- [ ] commit message follows commit guidelines

##### Affected core subsystem(s)
<!-- Provide affected core subsystem(s). -->


##### Description of change
<!-- Provide a description of the change below this comment. -->

<!--
- any feature?
- close https://github.com/eggjs/egg/ISSUE_URL
-->

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced a new enum value, `SOFA_RPC_STREAM`, to enhance controller
and method type definitions, providing greater flexibility in the
application.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
akitaSummer authored Oct 10, 2024
1 parent d29c94f commit 7f3d40b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/types/controller-decorator/model/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export type { IncomingHttpHeaders } from 'node:http';
export enum ControllerType {
HTTP = 'HTTP',
SOFA_RPC = 'SOFA_RPC',
SOFA_RPC_STREAM = 'SOFA_RPC_STREAM',
MGW_RPC = 'MGW_RPC',
MESSAGE = 'MESSAGE',
SCHEDULE = 'SCHEDULE',
Expand All @@ -21,6 +22,7 @@ export type ControllerTypeLike = ControllerType | string;
export enum MethodType {
HTTP = 'HTTP',
SOFA_RPC = 'SOFA_RPC',
SOFA_RPC_STREAM = 'SOFA_RPC_STREAM',
MGW_RPC = 'MGW_RPC',
MESSAGE = 'MESSAGE',
SCHEDULE = 'SCHEDULE',
Expand Down

0 comments on commit 7f3d40b

Please sign in to comment.