Skip to content

Commit

Permalink
Merge pull request #3 from williamfeng323/feature/registry-listener
Browse files Browse the repository at this point in the history
Feature/registry listener
  • Loading branch information
ztelur authored Sep 30, 2021
2 parents 7017db0 + 29d2365 commit f24e45f
Show file tree
Hide file tree
Showing 9 changed files with 114 additions and 9 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.14

require (
github.com/alibaba/sentinel-golang v1.0.2
github.com/apache/dubbo-go v1.5.7
github.com/apache/dubbo-go v1.5.7-rc2
github.com/apache/dubbo-go-hessian2 v1.9.3
github.com/creasty/defaults v1.5.2
github.com/dubbogo/dubbo-go-pixiu-filter v0.1.4
Expand Down
17 changes: 17 additions & 0 deletions pkg/adapter/dubboregistry/common/common.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package common

import (
Expand Down
17 changes: 17 additions & 0 deletions pkg/adapter/dubboregistry/registry/base/baseregistry.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package baseregistry

import (
Expand Down
17 changes: 17 additions & 0 deletions pkg/adapter/dubboregistry/registry/base/baseregistry_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package baseregistry

import (
Expand Down
2 changes: 1 addition & 1 deletion pkg/adapter/dubboregistry/registry/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func ParseDubboString(urlString string) (config.DubboBackendConfig, []string, er
return config.DubboBackendConfig{
ClusterName: url.GetParam(constant.ClusterKey, ""),
ApplicationName: url.GetParam(constant.ApplicationKey, ""),
Version: url.GetParam(constant.AppVersionKey, ""),
Version: url.GetParam(constant.VersionKey, ""),
Protocol: string(config.DubboRequest),
Group: url.GetParam(constant.GroupKey, ""),
Interface: url.GetParam(constant.InterfaceKey, ""),
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package zookeeper
17 changes: 17 additions & 0 deletions pkg/adapter/dubboregistry/registrycenter.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package dubboregistry

import (
Expand Down
17 changes: 17 additions & 0 deletions pkg/server/api_config_manager.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package server

import (
Expand Down
17 changes: 10 additions & 7 deletions samples/dubbogo/simple/registry/pixiu/conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ static_resources:
- match:
prefix: "/"
route:
cluster: "test-grpc"
cluster: "test-dubbo"
cluster_not_found_response_code: 505
http_filters:
- name: dgp.filter.http.apiconfig
Expand All @@ -58,20 +58,23 @@ static_resources:
timeout_config:
connect_timeout: 5s
request_timeout: 5s
- name: dgp.filter.http.response
config:
server_name: "test_http_dubbo"
generate_request_id: false
config:
idle_timeout: 5s
read_timeout: 5s
write_timeout: 5s
clusters:
- name: "test-grpc"
- name: "test-dubbo"
lb_policy: "RoundRobin"
endpoints:
- socket_address:
address: 127.0.0.1
port: 50001
protocol_type: "GRPC"
registries:
"zookeeper":
timeout: "3s"
address: "127.0.0.1:2181"
username: ""
password: ""
timeout_config:
connect_timeout: "5s"
request_timeout: "10s"
Expand Down

0 comments on commit f24e45f

Please sign in to comment.