Skip to content

提议分开 http 和 gRPC 的实现代码 #31

Open
@kids-return

Description

@kids-return
  1. 可以在项目中 同时支持 http 和 gRPC 两种协议,配置里不再需要 'protocol' => Protocol::HTTP,
  2. 对强类型更友好
    例如
现在的 Tcc callBranch
public function callBranch($body, string $tryUrl, string $confirmUrl, string $cancelUrl)

之后
Http 文件的 TCC callBranch
public function callBranch(array $body, string $tryUrl, string $confirmUrl, string $cancelUrl)

gRPC 文件的 TCC callBranch
public function callBranch(\Google\Protobuf\Internal\Message $body, string $tryUrl, string $confirmUrl, string $cancelUrl)
  1. 维护起来更方便,相关的实现之间不会有影响,也便于后续的协议扩展

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions