diff --git a/.github/workflows/push-check.yml b/.github/workflows/push-check.yml index f4a9eb76ff3..10c8742a2b4 100644 --- a/.github/workflows/push-check.yml +++ b/.github/workflows/push-check.yml @@ -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 diff --git a/_typos.toml b/_typos.toml index 7b65bdf9317..7f5f84cfe22 100644 --- a/_typos.toml +++ b/_typos.toml @@ -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" \ No newline at end of file +invokable = "invokable" +typ = "typ" diff --git a/content/en/blog/releases/Kitex/release-v043.md b/content/en/blog/releases/Kitex/release-v043.md index c8dee4389f8..34274ee7c15 100644 --- a/content/en/blog/releases/Kitex/release-v043.md +++ b/content/en/blog/releases/Kitex/release-v043.md @@ -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. --- diff --git a/content/en/blog/releases/Kitex/release-v0_13_0.md b/content/en/blog/releases/Kitex/release-v0_13_0.md index 231d2b40fb9..9866ec60743 100644 --- a/content/en/blog/releases/Kitex/release-v0_13_0.md +++ b/content/en/blog/releases/Kitex/release-v0_13_0.md @@ -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 diff --git a/content/en/cooperation/shumei.md b/content/en/cooperation/shumei.md index 44858663eac..3f83ab5e811 100644 --- a/content/en/cooperation/shumei.md +++ b/content/en/cooperation/shumei.md @@ -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 的话,那就可以去保证我们这些计算密集能服务在它的排队时间,等到一定时间的时候我们就立即丢弃请求。 diff --git a/content/en/docs/hertz/tutorials/basic-feature/context/response.md b/content/en/docs/hertz/tutorials/basic-feature/context/response.md index 3ddfff1e89a..3e4b3fcd8ab 100644 --- a/content/en/docs/hertz/tutorials/basic-feature/context/response.md +++ b/content/en/docs/hertz/tutorials/basic-feature/context/response.md @@ -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) | diff --git a/content/en/docs/hertz/tutorials/third-party/middleware/casbin.md b/content/en/docs/hertz/tutorials/third-party/middleware/casbin.md index cdf53b31d24..c4dde2a23c5 100644 --- a/content/en/docs/hertz/tutorials/third-party/middleware/casbin.md +++ b/content/en/docs/hertz/tutorials/third-party/middleware/casbin.md @@ -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. diff --git a/content/en/docs/hertz/tutorials/third-party/service_discovery/etcd.md b/content/en/docs/hertz/tutorials/third-party/service_discovery/etcd.md index 1263cd5c8b6..377a6249e5d 100644 --- a/content/en/docs/hertz/tutorials/third-party/service_discovery/etcd.md +++ b/content/en/docs/hertz/tutorials/third-party/service_discovery/etcd.md @@ -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 { diff --git a/content/en/docs/hertz/tutorials/third-party/service_discovery/redis.md b/content/en/docs/hertz/tutorials/third-party/service_discovery/redis.md index e4941dfdd88..cbaae542f7b 100644 --- a/content/en/docs/hertz/tutorials/third-party/service_discovery/redis.md +++ b/content/en/docs/hertz/tutorials/third-party/service_discovery/redis.md @@ -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), diff --git a/content/en/docs/hertz/tutorials/third-party/service_discovery/servicecomb.md b/content/en/docs/hertz/tutorials/third-party/service_discovery/servicecomb.md index be8e888477d..75ef4deaae5 100644 --- a/content/en/docs/hertz/tutorials/third-party/service_discovery/servicecomb.md +++ b/content/en/docs/hertz/tutorials/third-party/service_discovery/servicecomb.md @@ -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: diff --git a/content/en/docs/kitex/Tutorials/advanced-feature/codec_frugal.md b/content/en/docs/kitex/Tutorials/advanced-feature/codec_frugal.md index af84760d2ea..0d6b56f3ac1 100644 --- a/content/en/docs/kitex/Tutorials/advanced-feature/codec_frugal.md +++ b/content/en/docs/kitex/Tutorials/advanced-feature/codec_frugal.md @@ -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 diff --git a/content/en/docs/kitex/Tutorials/advanced-feature/generic-call/generic-call-reflection.md b/content/en/docs/kitex/Tutorials/advanced-feature/generic-call/generic-call-reflection.md index f99c383eded..2ccb64298d1 100644 --- a/content/en/docs/kitex/Tutorials/advanced-feature/generic-call/generic-call-reflection.md +++ b/content/en/docs/kitex/Tutorials/advanced-feature/generic-call/generic-call-reflection.md @@ -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) } @@ -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) diff --git a/content/en/docs/kitex/Tutorials/advanced-feature/metainfo.md b/content/en/docs/kitex/Tutorials/advanced-feature/metainfo.md index 73ded2d134c..e76c841fee0 100644 --- a/content/en/docs/kitex/Tutorials/advanced-feature/metainfo.md +++ b/content/en/docs/kitex/Tutorials/advanced-feature/metainfo.md @@ -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 ... } diff --git a/content/en/docs/kitex/Tutorials/basic-feature/streamx/Kitex+StreamX+-+Stream+Middleware.md b/content/en/docs/kitex/Tutorials/basic-feature/streamx/Kitex+StreamX+-+Stream+Middleware.md index a159a5c7276..0874a26f099 100644 --- a/content/en/docs/kitex/Tutorials/basic-feature/streamx/Kitex+StreamX+-+Stream+Middleware.md +++ b/content/en/docs/kitex/Tutorials/basic-feature/streamx/Kitex+StreamX+-+Stream+Middleware.md @@ -58,7 +58,7 @@ type StreamRecvMiddleware func(next StreamRecvEndpoint) StreamRecvEndpoint | StreamRecvMiddleware | - The data is not really collected, just called the stream.Recv () function.

- Res parameter is empty | - Data received or encountered an error

- The res parameter has a real value | | StreamSendMiddleware | - The data was not actually sent, just called the stream.Send () function

- The req parameter is a real request | - Data transmission completed or encountered an error

- 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. diff --git a/content/en/docs/kitex/Tutorials/code-gen/prutal.md b/content/en/docs/kitex/Tutorials/code-gen/prutal.md index 220172fb1d7..0c7fd5e84c7 100644 --- a/content/en/docs/kitex/Tutorials/code-gen/prutal.md +++ b/content/en/docs/kitex/Tutorials/code-gen/prutal.md @@ -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. diff --git a/content/en/docs/kitex/Tutorials/code-gen/template_extension.md b/content/en/docs/kitex/Tutorials/code-gen/template_extension.md index d698138f9f4..cbea9b4823e 100644 --- a/content/en/docs/kitex/Tutorials/code-gen/template_extension.md +++ b/content/en/docs/kitex/Tutorials/code-gen/template_extension.md @@ -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. diff --git a/content/en/docs/kitex/Tutorials/service-governance/retry.md b/content/en/docs/kitex/Tutorials/service-governance/retry.md index 8679e01923b..a0113c49dd1 100644 --- a/content/en/docs/kitex/Tutorials/service-governance/retry.md +++ b/content/en/docs/kitex/Tutorials/service-governance/retry.md @@ -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. | @@ -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 | diff --git a/content/en/docs/kitex/Tutorials/third-party/config-center/nacos.md b/content/en/docs/kitex/Tutorials/third-party/config-center/nacos.md index 7e90662836c..0fc5d7e5b0a 100644 --- a/content/en/docs/kitex/Tutorials/third-party/config-center/nacos.md +++ b/content/en/docs/kitex/Tutorials/third-party/config-center/nacos.md @@ -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 { diff --git a/content/en/docs/kitex/Tutorials/third-party/service_discovery/service-comb.md b/content/en/docs/kitex/Tutorials/third-party/service_discovery/service-comb.md index b058a50a74c..c2fd3b3c637 100644 --- a/content/en/docs/kitex/Tutorials/third-party/service_discovery/service-comb.md +++ b/content/en/docs/kitex/Tutorials/third-party/service_discovery/service-comb.md @@ -188,7 +188,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: diff --git a/content/en/docs/monolake/Config Guide/_index.md b/content/en/docs/monolake/Config Guide/_index.md index 45ab712dc3c..a3833474046 100644 --- a/content/en/docs/monolake/Config Guide/_index.md +++ b/content/en/docs/monolake/Config Guide/_index.md @@ -2,7 +2,7 @@ title: "Config Guide" linkTitle: "Config Guide" weight: 5 -description: "Comphrensive guide to configuring monolake proxy" +description: "Comprehensive guide to configuring monolake proxy" --- # Proxy Configuration Guide diff --git a/content/zh/blog/news/1st_httpHertz/index.md b/content/zh/blog/news/1st_httpHertz/index.md index 7d6aa69a208..cf07aa8fd99 100644 --- a/content/zh/blog/news/1st_httpHertz/index.md +++ b/content/zh/blog/news/1st_httpHertz/index.md @@ -218,7 +218,7 @@ Ginex 是一个基于 Gin 的开源封装,所以它本身在迭代方面是受 #### bufio.Reader 的问题 -这样做出现的问题是,原生的 bufio.Reader 长度是固定的,请求的 Header 大小超出 buffer 长度后,`.Peek()` 方法直接报错 `(ErrBufferFul)`,无法完成既定语义功能。 +这样做出现的问题是,原生的 bufio.Reader 长度是固定的,请求的 Header 大小超出 buffer 长度后,`.Peek()` 方法直接报错 `(ErrBufferFull)`,无法完成既定语义功能。 #### 一些可能的解 diff --git a/content/zh/blog/releases/Kitex/release-v0_13_0.md b/content/zh/blog/releases/Kitex/release-v0_13_0.md index d587b0c86a9..42523b6d106 100644 --- a/content/zh/blog/releases/Kitex/release-v0_13_0.md +++ b/content/zh/blog/releases/Kitex/release-v0_13_0.md @@ -90,7 +90,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 diff --git a/content/zh/cooperation/shumei.md b/content/zh/cooperation/shumei.md index 75218703cf1..20905f2166a 100644 --- a/content/zh/cooperation/shumei.md +++ b/content/zh/cooperation/shumei.md @@ -254,7 +254,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 的话,那就可以去保证我们这些计算密集能服务在它的排队时间,等到一定时间的时候我们就立即丢弃请求。 diff --git a/content/zh/docs/eino/core_modules/devops/visual_orchestration_plugin_guide.md b/content/zh/docs/eino/core_modules/devops/visual_orchestration_plugin_guide.md index 61eb78da3e4..4b99cccc770 100644 --- a/content/zh/docs/eino/core_modules/devops/visual_orchestration_plugin_guide.md +++ b/content/zh/docs/eino/core_modules/devops/visual_orchestration_plugin_guide.md @@ -60,7 +60,7 @@ weight: 2 ### 插槽 ( Slot ) - 不同类型的 Component 的生成会依赖其他组件,将其作为自身配置依赖的一部分,这部分依赖被称作插槽( Slot )。 -- 比如官方提供的 volc_vikingDB 组件,其依赖了 Embeding Component 作为插槽;再比如官方提供的 ToolsNode 组件,其依赖了多个 Tool Component。 +- 比如官方提供的 volc_vikingDB 组件,其依赖了 Embedding Component 作为插槽;再比如官方提供的 ToolsNode 组件,其依赖了多个 Tool Component。
diff --git a/content/zh/docs/hertz/tutorials/third-party/middleware/casbin.md b/content/zh/docs/hertz/tutorials/third-party/middleware/casbin.md index 55e1b70e61c..04a89495fe1 100644 --- a/content/zh/docs/hertz/tutorials/third-party/middleware/casbin.md +++ b/content/zh/docs/hertz/tutorials/third-party/middleware/casbin.md @@ -174,7 +174,7 @@ func main() { 该中间件的方法参数格式如下: ```go -func (m *Middleware) exampleMiddlwareMethod(expression string, opts ...Option) app.HandlerFunc +func (m *Middleware) exampleMiddlewareMethod(expression string, opts ...Option) app.HandlerFunc ``` 其中包含 **expression** 和 **opts** 两个参数, diff --git a/content/zh/docs/hertz/tutorials/third-party/service_discovery/redis.md b/content/zh/docs/hertz/tutorials/third-party/service_discovery/redis.md index c009ef269a0..52e18be2301 100644 --- a/content/zh/docs/hertz/tutorials/third-party/service_discovery/redis.md +++ b/content/zh/docs/hertz/tutorials/third-party/service_discovery/redis.md @@ -65,7 +65,7 @@ func WithRefreshInterval(interval int) Option ```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), diff --git a/content/zh/docs/hertz/tutorials/third-party/service_discovery/servicecomb.md b/content/zh/docs/hertz/tutorials/third-party/service_discovery/servicecomb.md index a965839e36e..8fe19c5b87e 100644 --- a/content/zh/docs/hertz/tutorials/third-party/service_discovery/servicecomb.md +++ b/content/zh/docs/hertz/tutorials/third-party/service_discovery/servicecomb.md @@ -353,7 +353,7 @@ func main() { ### NewSCResolver -`NewSCReslover` 使用 service-comb 创建一个新的服务发现中心。需要传入自定义客户端。可自定义服务发现中心配置。 +`NewSCResolver` 使用 service-comb 创建一个新的服务发现中心。需要传入自定义客户端。可自定义服务发现中心配置。 函数签名: diff --git a/content/zh/docs/kitex/Tutorials/advanced-feature/generic-call/basic_usage.md b/content/zh/docs/kitex/Tutorials/advanced-feature/generic-call/basic_usage.md index 30d80bb0d5a..f13d226a4ea 100644 --- a/content/zh/docs/kitex/Tutorials/advanced-feature/generic-call/basic_usage.md +++ b/content/zh/docs/kitex/Tutorials/advanced-feature/generic-call/basic_usage.md @@ -367,7 +367,7 @@ func main(){ 二进制泛化调用的客户端和服务端**并不是配套**使用的,客户端只要传入**正确的 Thrift 二进制编码格式**的参数,可以请求普通 Thrift 接口服务。 -二进制泛化 Server 只支持 Framed 或 TTHeader 请求,不支持 Bufferd Binary,需要 Client 通过 Option 指定,如:`client.WithTransportProtocol(transport.Framed)`。 +二进制泛化 Server 只支持 Framed 或 TTHeader 请求,不支持 Buffered Binary,需要 Client 通过 Option 指定,如:`client.WithTransportProtocol(transport.Framed)`。 ```go package main diff --git a/content/zh/docs/kitex/Tutorials/advanced-feature/generic-call/generic-call-reflection.md b/content/zh/docs/kitex/Tutorials/advanced-feature/generic-call/generic-call-reflection.md index 7710dc54946..5bff7c2dfe9 100644 --- a/content/zh/docs/kitex/Tutorials/advanced-feature/generic-call/generic-call-reflection.md +++ b/content/zh/docs/kitex/Tutorials/advanced-feature/generic-call/generic-call-reflection.md @@ -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) } @@ -435,7 +435,7 @@ BenchmarkThriftReflectExample_DOM-16 321 3719926 ns/op 433 可以使用 [generic.DescriptorToPathNode ](https://github.com/cloudwego/dynamicgo/tree/main/thrift/generic#func-descriptortopathnode)进行快速构造 struct DOM(**零值)** ```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) diff --git a/content/zh/docs/kitex/Tutorials/advanced-feature/metainfo.md b/content/zh/docs/kitex/Tutorials/advanced-feature/metainfo.md index 4a4681e204a..241a2c86a2e 100644 --- a/content/zh/docs/kitex/Tutorials/advanced-feature/metainfo.md +++ b/content/zh/docs/kitex/Tutorials/advanced-feature/metainfo.md @@ -60,7 +60,7 @@ func (MyServiceImpl) SomeMethod(ctx context.Context, req *SomeRequest) (res *Som println(logid) // "12345" // 如果需要调用其他服务的话 - req2 := myservice2.NewRequset() + req2 := myservice2.NewRequest() res2, err2 := cli2.SomeMethod2(ctx, req2) // 在调用其他服务时继续传递收到的 context,可以让持续的元信息继续传递下去 ... } diff --git a/content/zh/docs/kitex/Tutorials/basic-feature/streamx/Stream+Middleware.md b/content/zh/docs/kitex/Tutorials/basic-feature/streamx/Stream+Middleware.md index fe15faac25d..128db03d8f4 100644 --- a/content/zh/docs/kitex/Tutorials/basic-feature/streamx/Stream+Middleware.md +++ b/content/zh/docs/kitex/Tutorials/basic-feature/streamx/Stream+Middleware.md @@ -44,7 +44,7 @@ type StreamRecvMiddleware func(next StreamRecvEndpoint) StreamRecvEndpoint type StreamRecvEndpoint func(ctx context.Context, stream streaming.ServerStream, message interface{}) (err error) type StreamRecvMiddleware func(next StreamRecvEndpoint) StreamRecvEndpoint -// Send middleware 和 Recv middlware 定义类似... +// Send middleware 和 Recv middleware 定义类似... ``` **参数说明**: diff --git a/content/zh/docs/kitex/Tutorials/third-party/service_discovery/service-comb.md b/content/zh/docs/kitex/Tutorials/third-party/service_discovery/service-comb.md index 7e7f7516585..550fee2b011 100644 --- a/content/zh/docs/kitex/Tutorials/third-party/service_discovery/service-comb.md +++ b/content/zh/docs/kitex/Tutorials/third-party/service_discovery/service-comb.md @@ -188,7 +188,7 @@ func main() { #### NewSCResolver -`NewSCReslover` 使用 service-comb 创建一个新的服务发现中心。需要传入自定义客户端。可自定义服务发现中心配置,配置详情见 Option。 +`NewSCResolver` 使用 service-comb 创建一个新的服务发现中心。需要传入自定义客户端。可自定义服务发现中心配置,配置详情见 Option。 函数签名: