Skip to content

Commit

Permalink
docs:readme
Browse files Browse the repository at this point in the history
  • Loading branch information
XZ0730 committed Jan 6, 2024
1 parent 7f132e0 commit e3edd97
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 2 deletions.
19 changes: 19 additions & 0 deletions v2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# registry-nacos (*This is a community driven project*)

[中文](https://github.com/kitex-contrib/registry-nacos/blob/main/v2/README_CN.md)

Nacos as service discovery.

## Compatibility

- This Package use Nacos2.x client.

- Nacos2.x detail [see](https://nacos.io/en-us/docs/v2/upgrading/2.0.0-compatibility.html)

- Supported Go version over 1.16

- Supported Nacos version over 2.x

### More Info

Refer to [example](example) for more usage.
20 changes: 20 additions & 0 deletions v2/README_CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# registry-nacos (*这是一个由社区驱动的项目*)

[English](https://github.com/kitex-contrib/registry-nacos/blob/main/v2/README.md)

使用 **nacos** 作为 **Kitex** 的注册中心

## 兼容性

- 使用 Nacos2.x 客户端

- Nacos2.x 详细信息[see](https://nacos.io/en-us/docs/v2/upgrading/2.0.0-compatibility.html)

- Go 版本不低于 1.16

- 支持Nacos 2.x

### 更多信息

更多示例请参考 [example](example)

6 changes: 5 additions & 1 deletion v2/example/custom-config/client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ import (
func main() {
// the nacos server config
sc := []constant.ServerConfig{
*constant.NewServerConfig("127.0.0.1", 8848),
*constant.NewServerConfig("127.0.0.1", 8848,
func(sc *constant.ServerConfig) {
// it is not recommended to modify GRPC-Port unless necessary,default by server port +1000
sc.GrpcPort = 9848
}),
}

// the nacos client config
Expand Down
6 changes: 5 additions & 1 deletion v2/example/custom-config/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ func (h *HelloImpl) Echo(_ context.Context, req *api.Request) (resp *api.Respons
func main() {
// the nacos server config
sc := []constant.ServerConfig{
*constant.NewServerConfig("127.0.0.1", 8848),
*constant.NewServerConfig("127.0.0.1", 8848,
func(sc *constant.ServerConfig) {
// it is not recommended to modify GRPC-Port unless necessary,default by server port +1000
sc.GrpcPort = 9848
}),
}

// the nacos client config
Expand Down

0 comments on commit e3edd97

Please sign in to comment.