Skip to content

chore: upgrade typos #1332

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/push-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ jobs:
- uses: actions/checkout@v4

- name: typos-action
uses: crate-ci/typos@v1.14.3
uses: crate-ci/typos@v1.32.0
8 changes: 7 additions & 1 deletion _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@
[files]
extend-exclude = ["*.json", "*.js", "static/*", "layouts/*", "assets/*", "i18n/*"]

[default]
extend-ignore-re = [
"mmaping files"
]

[default.extend-words]
datas = "datas"
mmaped = "mmaped"
exten = "exten"
invokable = "invokable"
invokable = "invokable"
typ = "typ"
2 changes: 1 addition & 1 deletion content/en/blog/releases/Kitex/release-v043.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ description: >
### **Optimization**

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

---

Expand Down
2 changes: 1 addition & 1 deletion content/en/blog/releases/Kitex/release-v0_13_0.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ description: >

[[#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

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

### Refactor
[[#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
Expand Down
2 changes: 1 addition & 1 deletion content/en/cooperation/shumei.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ Kitex 提供了一个很好的机制,叫**重试熔断**的机制,其中有

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

> 基础服务层大多是计算密集型服务,CPU 利用率等不完全反应程序的负载,服务过载可能是 GPU 负载过高。 使用请求在队列中的平均等待时间(“queue time”)来计算服务的负载。之所以不选择请求的平均处理时间(“procss time”),是为了去除下游服务调用的影响。有时 process time 的增加并不代表当前服务过载了,而是请求依赖的下游服务过载。另一方面,请求的 process time 增加到一定程度,当前服务的资源也会逐渐耗尽,最终反应在 queue time 的增加上。
> 基础服务层大多是计算密集型服务,CPU 利用率等不完全反应程序的负载,服务过载可能是 GPU 负载过高。 使用请求在队列中的平均等待时间(“queue time”)来计算服务的负载。之所以不选择请求的平均处理时间(“process time”),是为了去除下游服务调用的影响。有时 process time 的增加并不代表当前服务过载了,而是请求依赖的下游服务过载。另一方面,请求的 process time 增加到一定程度,当前服务的资源也会逐渐耗尽,最终反应在 queue time 的增加上。

我们可以看下图,当我们整个 CPU 或者是 GPU 整体的负载较高的时候,它的排队时间就会去无限长。所以这里给我们一种启发的机制,也就是说我们设置一个最长的队列等待时间。因为刚才也说了,在整个微服务的框架下,我们一定要干的一件事情就是一定要有超时的机制,因为没有超时的机制最终可能导致整个系统都被焊住。所以我们这里针对于这个 Queue Time 设置一个 Timeout 的话,那就可以去保证我们这些计算密集能服务在它的排队时间,等到一定时间的时候我们就立即丢弃请求。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,14 +375,14 @@ Use RequestContext.Response.Header to obtain the ResponseHeader object, this obj
| `func (h *ResponseHeader) DelClientCookieBytes(key []byte)` | Remove the cookie from the client |
| `func (h *ResponseHeader) SetConnectionClose(close bool)` | Set the `Connection: close` flag in the response header |
| `func (h *ResponseHeader) ConnectionClose() bool` | Determine if Connection: close is included |
| `func (h *ResponseHeader) ContentEncoding() []byte` | Obtion Content-Encoding |
| `func (h *ResponseHeader) ContentEncoding() []byte` | Option Content-Encoding |
| `func (h *ResponseHeader) SetContentEncoding(contentEncoding string)` | Set Content-Encoding |
| `func (h *ResponseHeader) SetContentEncodingBytes(contentEncoding []byte)` | Set Content-Encoding |
| `func (h *ResponseHeader) SetCanonical(key, value []byte)` | Set the Header key value, assuming that the key is in canonical form |
| `func (h *ResponseHeader) Server() []byte` | Return the value with key `Server` in the header |
| `func (h *ResponseHeader) SetServerBytes(server []byte)` | Set the key in the header to the value of Server |
| `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) |
| `func (h *ResponseHeader) StatusCode() int` | Obtion StatusCode |
| `func (h *ResponseHeader) StatusCode() int` | Option StatusCode |
| `func (h *ResponseHeader) SetStatusCode(statusCode int)` | Set StatusCode |
| `func (h *ResponseHeader) Len() int` | Return the number of headers |
| `func (h *ResponseHeader) DisableNormalizing()` | Disable the normalization of header name (capitalize the first letter and the first letter after the Em dash) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ middleware provide methods that perform authentication operation.
method parameter format is as follows:

```go
func (m *Middleware) exampleMiddlwareMethod(expression string, opts ...Option) app.HandlerFunc
func (m *Middleware) exampleMiddlewareMethod(expression string, opts ...Option) app.HandlerFunc
```

it contains **expression** and **opts** two params.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ func main() {
if err != nil {
panic(err)
}
r, err := etcd.NewEtcdResovler([]string{"127.0.0.1:2379"},
r, err := etcd.NewEtcdResolver([]string{"127.0.0.1:2379"},
etcd.WithAuthOpt("root","123456"),
)
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Sample code:

```go
func main() {
r := redis.NewRedisRegistry("127.0.0.1:6379", redis.WithRereshInterval(5))
r := redis.NewRedisRegistry("127.0.0.1:6379", redis.WithRefreshInterval(5))
// ...
h := server.Default(
server.WithHostPorts(addr),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ func main() {

### NewSCResolver

`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.
`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.

Function signature:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ Note:
1. If Framed is not set, there may be issues:
1. The server may not be able to decode with frugal without Payload Size (refer to: "Kitex Server -> Notes");
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);
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);
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);
3. `TTHeaderFramed` is an alternative (it's the BIT-OR result of `TTHeader | Framed`).

##### Example Code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ var (
)

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

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

var dom = new(PathNode)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (MyServiceImpl) SomeMethod(ctx context.Context, req *SomeRequest) (res *Som
println(logid) // "12345"

// if we need to call another service
req2 := myservice2.NewRequset()
req2 := myservice2.NewRequest()
res2, err2 := cli2.SomeMethod2(ctx, req2) // pass the context to other service for the persistent meta information to be transmitted continuously
...
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ type StreamRecvMiddleware func(next StreamRecvEndpoint) StreamRecvEndpoint
| 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 |
| 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 |

### Unary Middlware
### Unary Middleware

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

Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/kitex/Tutorials/code-gen/prutal.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Technically Prutal and Frugal are similar to the use of struct tags and efficien

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

## **Using Advices**
## **Using Advises**

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ extend_server:

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

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

```go {linenos=table,hl_lines=[8,22,"53-55"]}
// Code generated by Kitex v0.4.2. DO NOT EDIT.
Expand Down
4 changes: 2 additions & 2 deletions content/en/docs/kitex/Tutorials/service-governance/retry.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ type ShouldResultRetry struct {

| Configuration Item | Default value | Description | Limit |
| ------------------ | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- |
| `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. |
| `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. |
| `MaxRetryTimes` | 1 | The first request is not included. If it is configured as 0, it means to stop retrying. | Value: [0-2] |
| `EERThreshold` | 10% | If the method-level request error rate exceeds the threshold, retry stops. | Value: (0-30%] |
| `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. |
Expand All @@ -79,7 +79,7 @@ type ShouldResultRetry struct {

| Configuration Item | Default Val | Description | Legal value | 对比 Failure Retry | 对比 Backup Request |
| ------------------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |--------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 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. |
| 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. |
| 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 |
| 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 | —— |
| StopPolicy.CBPolicy | 10% | Retry Percentage LimitNote: Single instance - method granularity. If it exceeds the threshold, stop retrying. | (0-30%] | Same | Same |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ Example:

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

> configDataId: `ClientName.ServiecName.circuit_break`
> configDataId: `ClientName.ServiceName.circuit_break`

```json
{
Expand Down
Loading