dubbo-go-pixiu
dubbo-go-pixiu copied to clipboard
dynamic Router and Cluster from registry center
What this PR does:
dynamic Router and Cluster from registry center
ref #600
Special notes for your reviewer:
support application level and interface level service discovery support zk and nacos registry
application level service discovery use prefix url pattern to match http path,beacuse there is no methods information in the registry.
Does this PR introduce a user-facing change?:
adapters:
- id: test
name: dgp.adapter.dubboregistrycenter
config:
registries:
"zookeeper":
registry_type: application // new config field, support "application" or "interface"
protocol: zookeeper
address: "127.0.0.1:2181"
timeout: "5s"
demo project
https://github.com/FoghostCn/dubbo-go-pixiu-samples/blob/feature-registry-center/dubbogo/simple/zookeeper
- dubbo server: server/app/server.go
- test case: test/pixiu_test.go
- pixiu config: pixiu/conf.yaml
static_resources:
listeners:
- name: "net/http"
protocol_type: "HTTP"
address:
socket_address:
address: "0.0.0.0"
port: 8881
filter_chains:
filters:
- name: dgp.filter.httpconnectionmanager
config:
route_config:
dynamic: true
http_filters:
- name: dgp.filter.http.directdubboproxy
config:
adapters:
- id: test
name: dgp.adapter.dubboregistrycenter
config:
registries:
"zookeeper":
registry_type: application # or interface
protocol: zookeeper
address: "127.0.0.1:2181"
timeout: "5s"