apache / dubbo-go-pixiu

Based on the proxy gateway service of dubbo-go, it solves the problem that the external protocol calls the internal Dubbo cluster. At present, it supports HTTP and gRPC[developing].
https://dubbogo.github.io/dubbo-go-proxy/
Apache License 2.0
476 stars 149 forks source link

dynamic Router and Cluster from registry center #632

Open FoghostCn opened 4 months ago

FoghostCn commented 4 months ago

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

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"
sonarcloud[bot] commented 4 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

mark4z commented 4 months ago

升级3.1.1的时候屏蔽掉了几个UT,现在应该可以打开了

AlexStocks commented 3 months ago

ci 失败,check 下看看

AlexStocks commented 3 months ago

@coderabbitai review

AlexStocks commented 3 months ago

@CodiumAI-Agent /review

FoghostCn commented 3 months ago

ci失败是预期内,因为 https://github.com/apache/dubbo-go-pixiu/issues/600#issuecomment-2016656779

FoghostCn commented 1 week ago

ci fixed in https://github.com/apache/dubbo-go-pixiu-samples/pull/58

sonarcloud[bot] commented 1 week ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud