Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
whalecold committed Sep 4, 2024
1 parent 9f9d090 commit 2da1ee2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -400,4 +400,4 @@ This package is only tested under Istio1.13.3.
maintained by: [ppzqh](https://github.com/ppzqh)

## Dependencies
Kitex >= v0.4.0
Kitex >= v0.10.3
18 changes: 7 additions & 11 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,13 @@ func routeByStage(ctx context.Context) map[string]string {
}
// add the option
client.WithXDSSuite(xds2.ClientSuite{
client.NewClientSuite(
RouterMiddleware: xdssuite.NewXDSRouterMiddleware(
// use this option to specify the meta extractor
xdssuite.WithRouterMetaExtractor(routeByStage),
),
Resolver: xdssuite.NewXDSResolver(),
}),
),
```
* 在调用时设置流量的元信息(需与元信息提取方法对应)。这里,我们使用`metainfo.WithValue` 来指定流量的标签。在路由匹配时,会提取元信息进行匹配。
```
Expand Down Expand Up @@ -331,7 +331,6 @@ spec:
```
import (
"github.com/cloudwego/kitex/client"
xds2 "github.com/cloudwego/kitex/pkg/xds"
"github.com/kitex-contrib/xds"
"github.com/kitex-contrib/xds/xdssuite"
"github.com/cloudwego/kitex-proxyless-test/service/codec/thrift/kitex_gen/proxyless/greetservice"
Expand All @@ -347,10 +346,7 @@ func main() {
// initialize the client
cli, err := greetservice.NewClient(
destService,
client.WithXDSSuite(xds2.ClientSuite{
RouterMiddleware: xdssuite.NewXDSRouterMiddleware(),
Resolver: xdssuite.NewXDSResolver(),
}),
xdssuite.NewClientSuite(),
)
req := &proxyless.HelloRequest{Message: "Hello!"}
Expand Down Expand Up @@ -378,15 +374,15 @@ spec:
mode: DISABLE
```

### 有限的服务治理功能
当前版本仅支持客户端通过 xDS 进行服务发现、流量路由、速率限制、超时配置和熔断。
### 功能支持范围
当前版本支持客户端通过 xDS 进行服务发现、流量路由、速率限制、重试、超时配置和熔断。

xDS 所支持的其他服务治理功能,包括负载平衡和重试等,将在未来补齐。
xDS 所支持的其他服务治理功能,包括负载平衡等,将在未来补齐。

## 兼容性
此项目仅在 Istio1.13.3 下进行测试。

maintained by: [ppzqh](https://github.com/ppzqh)

## 依赖
Kitex >= v0.4.0
Kitex >= v0.10.3

0 comments on commit 2da1ee2

Please sign in to comment.