Skip to content

Commit 73e5a37

Browse files
authored
docs: add note info for Acquire Kitex RPC Info (#1097)
1 parent 679aace commit 73e5a37

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

content/en/docs/kitex/Tutorials/basic-feature/acquire_rpcinfo.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ description: ""
1010

1111
The default lifecycle of Kitex's RPCInfo is from the start of the request to the return of the request (performance considerations), and then it will be placed in sync.Pool to reuse. On the Server side, if it is asynchronously obtained and used in the business Handler, it may lead to read dirty data, nil panic.
1212

13+
**Note:** Some information needs to rely on the transport protocol (TTHeader or HTTP2) and corresponding MetaHandler. Please refer to [here](/docs/kitex/tutorials/basic-feature/protocol/transport_protocol/#thrift).
14+
1315
### 1.1 Synchronous usage
1416

1517
| **Information obtained** | **Kitex fetch method** |

content/zh/docs/hertz/tutorials/basic-feature/binding-and-validate.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func main() {
7878

7979
### 参数校验
8080

81-
具体校验语法可参考[校验语法](https://github.com/bytedance/go-tagexpr/tree/master/validator)
81+
具体校验语法可参考 [校验语法](https://github.com/bytedance/go-tagexpr/tree/master/validator)
8282

8383
不通过 IDL 生成代码时直接在对应结构体字段打 tag,示例:
8484

@@ -88,7 +88,7 @@ type InfoRequest struct {
8888
}
8989
```
9090

91-
通过 IDL 生成代码时需添加相应的注解,可参考[Field 注解](/zh/docs/hertz/tutorials/toolkit/annotation/#field-注解)
91+
通过 IDL 生成代码时需添加相应的注解,可参考 [Field 注解](/zh/docs/hertz/tutorials/toolkit/annotation/#field-注解)
9292

9393
下面给出常见用法:
9494

content/zh/docs/hertz/tutorials/basic-feature/middleware/paseto.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ func main() {
625625
| 版本 | 本地 | 公共 |
626626
| ---- | ---------------------------------------------------------- | ----------------------------- | --- |
627627
| v1 | 使用“AES-256-CBC”加密并使用 HMAC-SHA-256 签名 | 使用 `RSA-SHA-256` 签名 |
628-
| v2 | 使用“XSalsa20Poly-1305”加密并使用“HMAC-SHA-384”签名` | 使用 `EdDSA``Ed25519`)签名 | |
628+
| v2 | 使用“XSalsa20Poly-1305”加密并使用“HMAC-SHA-384”签名`| 使用`EdDSA``Ed25519`)签名 | |
629629
| v3 | 使用“XChaCha20Poly1305”加密并使用“HMAC-SHA-384”签名` | 使用 `EdDSA``Ed25519`)签名 | |
630630
| v4 | 使用“XChaCha20Poly1305”加密,并使用“HMAC-SHA-512-256”签名` | 使用 `EdDSA``Ed448`)签名 | |
631631

content/zh/docs/kitex/Tutorials/basic-feature/acquire_rpcinfo.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ description: ""
1010

1111
Kitex 的 RPCInfo 的生命周期默认是从请求开始到请求返回(性能考虑),随后会被放到 sync.Pool 中复用。在 Server 端,如果在业务 Handler 中异步获取使用,可能会读到脏数据 / 空指针而 panic。
1212

13+
**注意:** 部分信息需要依赖传输协议(TTHeader 或 HTTP2)和对应的 Metahandler,如果是 Thrift 配置方式见 [这里](/zh/docs/kitex/tutorials/basic-feature/protocol/transport_protocol/#thrift)
14+
1315
### 1.1 同步使用方式
1416

1517
同步的使用方式是指用户没有在新起的 Goroutine 里获取 RPCInfo。

0 commit comments

Comments
 (0)