Skip to content

Commit 1bad6d1

Browse files
committed
docs(kitex): use English terminology for streaming modes in Chinese document
1 parent cfa2f73 commit 1bad6d1

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

content/zh/docs/kitex/Tutorials/advanced-feature/generic-call/generic_streaming.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ service TestService {
108108

109109
上述 IDL 包含以下场景:
110110

111-
1. 客户端流:客户端发送多条消息,服务端返回一条消息后关闭流。
112-
2. 服务端流:客户端发送一条消息,服务端返回多条消息后关闭流,适合大模型等场景。
113-
3. 双向流:客户端和服务端可独立收发消息,顺序可自定义。
114-
4. 单次调用(gRPC:带 `streaming.mode` 注解的非流式(不推荐,性能有损失)。
115-
5. Ping Pong 模式(KitexThrift:传统的 Thrift 一发一收模式,不使用流机制,性能更好,推荐使用。
111+
1. Client Streaming:客户端发送多条消息,服务端返回一条消息后关闭流。
112+
2. Server Streaming:客户端发送一条消息,服务端返回多条消息后关闭流,适合大模型等场景。
113+
3. Bidirectional Streaming:客户端和服务端可独立收发消息,顺序可自定义。
114+
4. Unary (gRPC):带 `streaming.mode` 注解的非流式(不推荐,性能有损失)。
115+
5. Ping Pong (KitexThrift):传统的 Thrift 一发一收模式,不使用流机制,性能更好,推荐使用。
116116

117117
流式客户端初始化示例:
118118

@@ -135,7 +135,7 @@ cli, err := genericclient.NewStreamingClient(
135135
// ... 其他流式调用示例 ...
136136
```
137137

138-
### 客户端流(Client Streaming
138+
### Client Streaming
139139

140140
示例:
141141

@@ -165,7 +165,7 @@ resp, err := streamCli.CloseAndRecv()
165165
strResp, ok := resp.(string) // 响应为 json 字符串
166166
```
167167

168-
### 服务端流(Server Streaming
168+
### Server Streaming
169169

170170
注意:`Recv` 返回 `io.EOF` 错误表示服务端已发送完毕并正常关闭流,其它非 nil 错误表示出错。
171171

@@ -197,7 +197,7 @@ for {
197197
}
198198
```
199199

200-
### 双向流(Bidirectional Streaming
200+
### Bidirectional Streaming
201201

202202
示例:
203203

@@ -273,7 +273,7 @@ go func() {
273273
wg.Wait()
274274
```
275275

276-
### 单次调用(PingPong)
276+
### Ping Pong
277277

278278
用法与普通(非流式)泛化调用类似。
279279

0 commit comments

Comments
 (0)