Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dynamic Router and Cluster from registry center #632

Merged
merged 7 commits into from
Nov 3, 2024

Conversation

FoghostCn
Copy link
Contributor

@FoghostCn FoghostCn commented May 19, 2024

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"

FoghostCn and others added 5 commits March 19, 2024 09:53
…roup

change path to /ApplicationName/Interface/Method
…re-registry-center

# Conflicts:
#	pkg/adapter/dubboregistry/registry/zookeeper/service_listener.go
#	pkg/adapter/dubboregistry/registrycenter.go
#	pkg/server/router_manager.go
Copy link

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

@FoghostCn FoghostCn requested review from mark4z, AlexStocks and ma642 May 21, 2024 12:20
@mark4z
Copy link
Member

mark4z commented May 29, 2024

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

@mark4z mark4z requested a review from PhilYue June 2, 2024 12:13
@mark4z mark4z marked this pull request as ready for review June 30, 2024 12:16
@mark4z mark4z closed this Jun 30, 2024
@mark4z mark4z reopened this Jun 30, 2024
@AlexStocks
Copy link
Contributor

ci 失败,check 下看看

@AlexStocks
Copy link
Contributor

@coderabbitai review

@AlexStocks
Copy link
Contributor

@CodiumAI-Agent /review

@FoghostCn
Copy link
Contributor Author

ci失败是预期内,因为 #600 (comment)

@FoghostCn
Copy link
Contributor Author

ci fixed in apache/dubbo-go-pixiu-samples#58

Copy link

@FoghostCn
Copy link
Contributor Author

FoghostCn commented Oct 28, 2024

ignore envoy ci failed -> CI / Go Test ubuntu-latest - Go 1.18 (pull_request_target) Failing after 41s

@mark4z mark4z merged commit a899e49 into apache:develop Nov 3, 2024
11 of 12 checks passed
@mark4z
Copy link
Member

mark4z commented Nov 3, 2024

Good job

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants