Skip to content

Commit

Permalink
[doc]: Add more document
Browse files Browse the repository at this point in the history
  • Loading branch information
xxx7xxxx committed Aug 24, 2021
1 parent eff8730 commit 4c467d3
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 8 deletions.
26 changes: 20 additions & 6 deletions doc/controllers.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# Controllers

- [Controllers](#controllers)
Expand Down Expand Up @@ -178,14 +179,16 @@ specUpdateInterval: 10s
heartbeatInterval: 5s
registryType: consul
serviceName: service-001
externalServiceRegistry: consul-service-registry-example
```

| Name | Type | Description | Required |
| ----------------- | ------ | ------------------------------------------------------------------------- | --------------------- |
| heartbeatInterval | string | Interval for one service instance reporting its heartbeat | Yes (default: 5s) |
| registryType | string | Protocol the registry center accepts, support `eureka`, `consul`, `nacos` | Yes (default: eureka) |
| apiPort | int | Port listening on for worker's API server | Yes (default: 13009) |
| ingressPort | int | Port listening on for for ingress traffic | Yes (default: 13010) |
| Name | Type | Description | Required |
| ----------------------- | ------ | ------------------------------------------------------------------------- | --------------------- |
| heartbeatInterval | string | Interval for one service instance reporting its heartbeat | Yes (default: 5s) |
| registryType | string | Protocol the registry center accepts, support `eureka`, `consul`, `nacos` | Yes (default: eureka) |
| apiPort | int | Port listening on for worker's API server | Yes (default: 13009) |
| ingressPort | int | Port listening on for for ingress traffic | Yes (default: 13010) |
| externalServiceRegistry | string | External service registry name | No |

### ConsulServiceRegistry

Expand Down Expand Up @@ -267,6 +270,17 @@ syncInterval: 10s

NacosServiceRegistry supports service discovery for Nacos as backend. The config looks like:

```yaml
kind: NacosServiceRegistry
name: nacos-service-registry-example
syncInterval: 10s
servers:
- scheme: http
port: 8848
contextPath: /nacos
ipAddr: 127.0.0.1
```

| Name | Type | Description | Required |
| ------------ | ------------------------------------- | ---------------------------- | ------------------ |
| servers | [][nacosServerSpec](#nacosserverspec) | Servers of Nacos | Yes |
Expand Down
2 changes: 1 addition & 1 deletion example/config/http-pipeline-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ filters:
X-Filter:
exact: candidate
mainPool:
serviceRegistry: etcd-service-registry-example
serviceRegistry: nacos-service-registry-example
serviceName: service-001
serversTags: ["v2"]
servers:
Expand Down
2 changes: 1 addition & 1 deletion example/config/mesh-controller-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ name: mesh-controller-example
kind: MeshController
heartbeatInterval: 5s
registryType: consul
externalServiceRegistry: etcd-service-registry-example
externalServiceRegistry: nacos-service-registry-example
8 changes: 8 additions & 0 deletions example/config/nacos-service-registry-example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
kind: NacosServiceRegistry
name: nacos-service-registry-example
syncInterval: 10s
servers:
- scheme: http
port: 8848
contextPath: /nacos
ipAddr: 127.0.0.1

0 comments on commit 4c467d3

Please sign in to comment.