Skip to content

Commit

Permalink
docs:fix description of Options (#5)
Browse files Browse the repository at this point in the history
* docs:optimize readme

* docs:fix description of Options

* docs:optimize Options
  • Loading branch information
ViolaPioggia authored Dec 3, 2023
1 parent f07bbd5 commit ee1fe89
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,13 @@ type Key struct {

| Variable Name | Default Value | Introduction |
|------------------|-------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Address | 127.0.0.1 | Etcd server address |
| Port | 2379 | Etcd server port |
| Node | 127.0.0.1:2379 | Etcd server nodes |
| Prefix | /KitexConfig | The prefix of Etcd |
| ClientPathFormat | {{.ClientServiceName}}/{{.ServerServiceName}}/{{.Category}} | Use go [template](https://pkg.go.dev/text/template) syntax rendering to generate the appropriate ID, and use `ClientServiceName` `ServiceName` `Category` three metadata that can be customised |
| ServerPathFormat | {{.ServerServiceName}}/{{.Category}} | Use go [template](https://pkg.go.dev/text/template) syntax rendering to generate the appropriate ID, and use `ServiceName` `Category` two metadatas that can be customised |
| Timeout | 5 * time.Second | five seconds timeout |
| LoggerConfig | NULL | Default Logger |
| ConfigParser | defaultConfigParser | The default is the parser that parses json |

#### Governance Policy
> The configPath and configPrefix in the following example use default values, the service name is `ServiceName` and the client name is `ClientName`.
Expand Down
6 changes: 4 additions & 2 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,13 @@ type Key struct {

| 参数 | 变量默认值 | 作用 |
|------------------|-------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------|
| Address | 127.0.0.1 | Etcd 服务器地址 |
| Port | 2379 | Etcd 服务器端口 |
| Node | 127.0.0.1:2379 | Etcd 服务器节点 |
| Prefix | /KitexConfig | Etcd 中的 prefix |
| ClientPathFormat | {{.ClientServiceName}}/{{.ServerServiceName}}/{{.Category}} | 使用 go [template](https://pkg.go.dev/text/template) 语法渲染生成对应的 ID, 使用 `ClientServiceName` `ServiceName` `Category` 三个元数据 |
| ServerPathFormat | {{.ServerServiceName}}/{{.Category}} | 使用 go [template](https://pkg.go.dev/text/template) 语法渲染生成对应的 ID, 使用 `ServiceName` `Category` 两个元数据 |
| Timeout | 5 * time.Second | 五秒超时时间 |
| LoggerConfig | NULL | 默认日志 |
| ConfigParser | defaultConfigParser | 解析 json 数据的解析器 |

#### 治理策略
下面例子中的 configPath 以及 configPrefix 均使用默认值,服务名称为 ServiceName,客户端名称为 ClientName
Expand Down

0 comments on commit ee1fe89

Please sign in to comment.