1
0
mirror of https://github.com/chai2010/advanced-go-programming-book.git synced 2025-05-24 12:32:21 +00:00
This commit is contained in:
Xargin 2018-05-25 19:56:15 +08:00
parent 2052d0e37f
commit c72ec578ae
2 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@
划分为 CLD 三层之后,在 C 层我们可能还需要同时支持多种协议。本章前面讲到的 thrift、gRPC 和 http 并不是一定只选择其中一种,有时我们需要支持其中的两种,比如同一个接口,我们既需要效率较高的 thrift也需要方便 debug 的 http 入口。这样请求的流程会变成下面这样:
TODOTODOthrift protocol -> controller -> logic -> dao|| http protocol -> controller -> logic -> dao
![control-flow](../images/ch6-08-control-flow.png)
```go
func CreateOrder(ctx context.Context, req *CreateOrderStruct) (*CreateOrderRespStruct, error) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB