Skip to content

Commit e4251fb

Browse files
committed
Fix typos
1 parent 520a62c commit e4251fb

File tree

31 files changed

+41
-35
lines changed

31 files changed

+41
-35
lines changed

_typos.toml

+7-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@
33
[files]
44
extend-exclude = ["*.json", "*.js", "static/*", "layouts/*", "assets/*", "i18n/*"]
55

6+
[default]
7+
extend-ignore-re = [
8+
"mmaping files"
9+
]
10+
611
[default.extend-words]
712
datas = "datas"
813
mmaped = "mmaped"
914
exten = "exten"
10-
invokable = "invokable"
15+
invokable = "invokable"
16+
typ = "typ"

content/en/blog/releases/Kitex/release-v043.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ description: >
1818
### **Optimization**
1919

2020
1. **Frugal Performance Optimization** : Support frugal precompile (pretouch) when new client or server, which is to reduce the impact of dynamic compilation on latency.
21-
2. **Connpool Optimiztion** : Refactor connection pool to improve the idle connections cleanup.
21+
2. **Connpool Optimization** : Refactor connection pool to improve the idle connections cleanup.
2222

2323
---
2424

content/en/blog/releases/Kitex/release-v0_13_0.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ description: >
9393

9494
[[#1725](https://github.com/cloudwego/kitex/pull/1725)] fix: code gen import issue for streamx mode, stream call judgement bug and set ttheader streaming as default
9595

96-
[[#1727](https://github.com/cloudwego/kitex/pull/1727)] fix(tool): fix tool UseStdLib remains unexcepted lib issue
96+
[[#1727](https://github.com/cloudwego/kitex/pull/1727)] fix(tool): fix tool UseStdLib remains unexpected lib issue
9797

9898
### Refactor
9999
[[#1658](https://github.com/cloudwego/kitex/pull/1658)] refactor: streamx api to adapt both grpc and ttheader streaming protocol and provide more user-friendly interface

content/en/cooperation/shumei.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ Kitex 提供了一个很好的机制,叫**重试熔断**的机制,其中有
250250

251251
**Thrift** **(C++)/ Fbthrift 服务的过载保护**
252252

253-
> 基础服务层大多是计算密集型服务,CPU 利用率等不完全反应程序的负载,服务过载可能是 GPU 负载过高。 使用请求在队列中的平均等待时间(“queue time”)来计算服务的负载。之所以不选择请求的平均处理时间(“procss time”),是为了去除下游服务调用的影响。有时 process time 的增加并不代表当前服务过载了,而是请求依赖的下游服务过载。另一方面,请求的 process time 增加到一定程度,当前服务的资源也会逐渐耗尽,最终反应在 queue time 的增加上。
253+
> 基础服务层大多是计算密集型服务,CPU 利用率等不完全反应程序的负载,服务过载可能是 GPU 负载过高。 使用请求在队列中的平均等待时间(“queue time”)来计算服务的负载。之所以不选择请求的平均处理时间(“process time”),是为了去除下游服务调用的影响。有时 process time 的增加并不代表当前服务过载了,而是请求依赖的下游服务过载。另一方面,请求的 process time 增加到一定程度,当前服务的资源也会逐渐耗尽,最终反应在 queue time 的增加上。
254254
255255
我们可以看下图,当我们整个 CPU 或者是 GPU 整体的负载较高的时候,它的排队时间就会去无限长。所以这里给我们一种启发的机制,也就是说我们设置一个最长的队列等待时间。因为刚才也说了,在整个微服务的框架下,我们一定要干的一件事情就是一定要有超时的机制,因为没有超时的机制最终可能导致整个系统都被焊住。所以我们这里针对于这个 Queue Time 设置一个 Timeout 的话,那就可以去保证我们这些计算密集能服务在它的排队时间,等到一定时间的时候我们就立即丢弃请求。
256256

content/en/docs/hertz/tutorials/basic-feature/context/response.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -375,14 +375,14 @@ Use RequestContext.Response.Header to obtain the ResponseHeader object, this obj
375375
| `func (h *ResponseHeader) DelClientCookieBytes(key []byte)` | Remove the cookie from the client |
376376
| `func (h *ResponseHeader) SetConnectionClose(close bool)` | Set the `Connection: close` flag in the response header |
377377
| `func (h *ResponseHeader) ConnectionClose() bool` | Determine if Connection: close is included |
378-
| `func (h *ResponseHeader) ContentEncoding() []byte` | Obtion Content-Encoding |
378+
| `func (h *ResponseHeader) ContentEncoding() []byte` | Option Content-Encoding |
379379
| `func (h *ResponseHeader) SetContentEncoding(contentEncoding string)` | Set Content-Encoding |
380380
| `func (h *ResponseHeader) SetContentEncodingBytes(contentEncoding []byte)` | Set Content-Encoding |
381381
| `func (h *ResponseHeader) SetCanonical(key, value []byte)` | Set the Header key value, assuming that the key is in canonical form |
382382
| `func (h *ResponseHeader) Server() []byte` | Return the value with key `Server` in the header |
383383
| `func (h *ResponseHeader) SetServerBytes(server []byte)` | Set the key in the header to the value of Server |
384384
| `func (h *ResponseHeader) MustSkipContentLength() bool` | Determine if there is a response body (according to the HTTP/1.1 protocol, there is no response body when the response status codes are 1xx, 204, or 304) |
385-
| `func (h *ResponseHeader) StatusCode() int` | Obtion StatusCode |
385+
| `func (h *ResponseHeader) StatusCode() int` | Option StatusCode |
386386
| `func (h *ResponseHeader) SetStatusCode(statusCode int)` | Set StatusCode |
387387
| `func (h *ResponseHeader) Len() int` | Return the number of headers |
388388
| `func (h *ResponseHeader) DisableNormalizing()` | Disable the normalization of header name (capitalize the first letter and the first letter after the Em dash) |

content/en/docs/hertz/tutorials/third-party/middleware/casbin.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ middleware provide methods that perform authentication operation.
174174
method parameter format is as follows:
175175

176176
```go
177-
func (m *Middleware) exampleMiddlwareMethod(expression string, opts ...Option) app.HandlerFunc
177+
func (m *Middleware) exampleMiddlewareMethod(expression string, opts ...Option) app.HandlerFunc
178178
```
179179

180180
it contains **expression** and **opts** two params.

content/en/docs/hertz/tutorials/third-party/service_discovery/etcd.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ func main() {
279279
if err != nil {
280280
panic(err)
281281
}
282-
r, err := etcd.NewEtcdResovler([]string{"127.0.0.1:2379"},
282+
r, err := etcd.NewEtcdResolver([]string{"127.0.0.1:2379"},
283283
etcd.WithAuthOpt("root","123456"),
284284
)
285285
if err != nil {

content/en/docs/hertz/tutorials/third-party/service_discovery/redis.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Sample code:
6565

6666
```go
6767
func main() {
68-
r := redis.NewRedisRegistry("127.0.0.1:6379", redis.WithRereshInterval(5))
68+
r := redis.NewRedisRegistry("127.0.0.1:6379", redis.WithRefreshInterval(5))
6969
// ...
7070
h := server.Default(
7171
server.WithHostPorts(addr),

content/en/docs/hertz/tutorials/third-party/service_discovery/servicecomb.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ func main() {
353353

354354
### NewSCResolver
355355

356-
`NewSCReslover` uses service-comb to create a new service discovery center. It needs to pass in a custom client. The configuration of the service discovery center can be customized.
356+
`NewSCResolver` uses service-comb to create a new service discovery center. It needs to pass in a custom client. The configuration of the service discovery center can be customized.
357357

358358
Function signature:
359359

content/en/docs/kitex/Tutorials/advanced-feature/codec_frugal.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ Note:
193193
1. If Framed is not set, there may be issues:
194194
1. The server may not be able to decode with frugal without Payload Size (refer to: "Kitex Server -> Notes");
195195
2. The server won't reply with a `Framed` payload, thus the Client may also not be able to decode with frugal (no Payload Size again);
196-
2. If the target server does not support `Framed`, then don't use it; the client can encode without it, but if the response (from the server) is not Framed (i.e. with preprended payload size), the client may not be able to decode with Frugal (so in this case, do not use slim template);
196+
2. If the target server does not support `Framed`, then don't use it; the client can encode without it, but if the response (from the server) is not Framed (i.e. with prepended payload size), the client may not be able to decode with Frugal (so in this case, do not use slim template);
197197
3. `TTHeaderFramed` is an alternative (it's the BIT-OR result of `TTHeader | Framed`).
198198

199199
##### Example Code

content/en/docs/kitex/Tutorials/advanced-feature/generic-call/generic-call-reflection.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ var (
7979
)
8080

8181
func initDescriptor() {
82-
sdesc, err := dt.NewDescritorFromPath(context.Background(), "idl/example.thrift")
82+
sdesc, err := dt.NewDescriptorFromPath(context.Background(), "idl/example.thrift")
8383
if err != nil {
8484
panic(err)
8585
}
@@ -435,7 +435,7 @@ It can be seen that as the data level continues to increase, the performance adv
435435
You can use [generic.DescriptorToPathNode ](https://github.com/cloudwego/dynamicgo/tree/main/thrift/generic#func-descriptortopathnode)to quickly construct the struct DOM ( **zero value**)
436436

437437
```go
438-
svc, err := thrift.NewDescritorFromPath(context.Background(), IDLPATH)
438+
svc, err := thrift.NewDescriptorFromPath(context.Background(), IDLPATH)
439439
desc := svc.Functions()[METHODNAME].Request().Struct().FieldById(1).Type() // ex: service.METHOD(1: req)
440440

441441
var dom = new(PathNode)

content/en/docs/kitex/Tutorials/advanced-feature/metainfo.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func (MyServiceImpl) SomeMethod(ctx context.Context, req *SomeRequest) (res *Som
6060
println(logid) // "12345"
6161

6262
// if we need to call another service
63-
req2 := myservice2.NewRequset()
63+
req2 := myservice2.NewRequest()
6464
res2, err2 := cli2.SomeMethod2(ctx, req2) // pass the context to other service for the persistent meta information to be transmitted continuously
6565
...
6666
}

content/en/docs/kitex/Tutorials/basic-feature/streamx/Kitex+StreamX+-+Stream+Middleware.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ type StreamRecvMiddleware func(next StreamRecvEndpoint) StreamRecvEndpoint
5858
| StreamRecvMiddleware | - The data is not really collected, just called the stream.Recv () function.<br><br>- Res parameter is empty | - Data received or encountered an error<br><br>- The res parameter has a real value |
5959
| StreamSendMiddleware | - The data was not actually sent, just called the stream.Send () function<br><br>- The req parameter is a real request | - Data transmission completed or encountered an error<br><br>- The req parameter is a real request |
6060

61-
### Unary Middlware
61+
### Unary Middleware
6262

6363
For all non-streaming interfaces, we additionally provide ```UnaryMiddleware``` for injecting middleware that only works on all unary methods.
6464

content/en/docs/kitex/Tutorials/code-gen/prutal.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Technically Prutal and Frugal are similar to the use of struct tags and efficien
1818

1919
Currently open source, the specific implementation and subsequent benchmark data can be viewed: https://github.com/cloudwego/prutal
2020

21-
## **Using Advices**
21+
## **Using Advises**
2222

2323
Initially, it is not recommended that users use Prutal directly, and currently only promises forward and backward compatibility with Prutal integration in Kitex.
2424

content/en/docs/kitex/Tutorials/code-gen/template_extension.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ extend_server:
6363

6464
- **extend_server** field works like the **extend_client** field.
6565

66-
An IDL that applied the extensions.yaml above may produce a cient.go like this (the injected part is highlighted):
66+
An IDL that applied the extensions.yaml above may produce a client.go like this (the injected part is highlighted):
6767

6868
```go {linenos=table,hl_lines=[8,22,"53-55"]}
6969
// Code generated by Kitex v0.4.2. DO NOT EDIT.

content/en/docs/kitex/Tutorials/service-governance/retry.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ type ShouldResultRetry struct {
6969

7070
| Configuration Item | Default value | Description | Limit |
7171
| ------------------ | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- |
72-
| `RetryDelayMS` | - | Duration of waiting for initiating a Backup Requset when the first request is not returned. This parameter must be set manually. It is suggested to set as TP99. |
72+
| `RetryDelayMS` | - | Duration of waiting for initiating a Backup Request when the first request is not returned. This parameter must be set manually. It is suggested to set as TP99. |
7373
| `MaxRetryTimes` | 1 | The first request is not included. If it is configured as 0, it means to stop retrying. | Value: [0-2] |
7474
| `EERThreshold` | 10% | If the method-level request error rate exceeds the threshold, retry stops. | Value: (0-30%] |
7575
| `ChainStop` | false | `Chain Stop` is enabled by default. If the upstream request is a retry request, it will not be retried after timeout. | >= v0.0.5 as the default policy. |
@@ -79,7 +79,7 @@ type ShouldResultRetry struct {
7979

8080
| Configuration Item | Default Val | Description | Legal value | 对比 Failure Retry | 对比 Backup Request |
8181
| ------------------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |--------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|
82-
| RetryDelayMS | - | Duration of waiting for initiating a Backup Requset when the first request is not returned. This parameter must be set manually. It is suggested to be set as TP99. | | —— | As long as there is a result for Backup Request, no new Backup Request will be sent regardless of the result.Mixed Retry waits for valid results to be replied. |
82+
| RetryDelayMS | - | Duration of waiting for initiating a Backup Request when the first request is not returned. This parameter must be set manually. It is suggested to be set as TP99. | | —— | As long as there is a result for Backup Request, no new Backup Request will be sent regardless of the result.Mixed Retry waits for valid results to be replied. |
8383
| MaxRetryTimes | 1 | The maximum number of retries for both Backup request and Failure Retry, excluding the first request. If configured to 0, it means to stop retrying. | [0-3] | Legal val: [0-2]Default Val: 2 | Legal val: [0-5]Default Val: 1 |
8484
| MaxDurationMS | 0 | The cumulative maximum time consumption, including the first failed request and the retry requests. If time consumption reaches the limit, the subsequent retries will be stopped, and the unit is ms. 0 means no limit. Note: If configured, the configuration item must be greater than the request timed out time. | Minimum: RPCTimeoutTheoretical Maximum:RPCTimeout * (MaxRetryTimes+1) | Default Val: 0 | —— |
8585
| StopPolicy.CBPolicy | 10% | Retry Percentage LimitNote: Single instance - method granularity. If it exceeds the threshold, stop retrying. | (0-30%] | Same | Same |

content/en/docs/kitex/Tutorials/third-party/config-center/nacos.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ Example:
354354

355355
The echo method uses the following configuration (0.3, 100) and other methods use the global default configuration (0.5, 200)
356356

357-
> configDataId: `ClientName.ServiecName.circuit_break`
357+
> configDataId: `ClientName.ServiceName.circuit_break`
358358
359359
```json
360360
{

0 commit comments

Comments
 (0)