diff --git a/README.md b/README.md index a9a63c156e034f285865658c0bfccb3871018701..29447d21c95493282670cf53737e1da077036184 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Go for Apache Dubbo [涓枃](./README_CN.md) # -[](https://travis-ci.com/dubbo/go-for-apache-dubbo) -[](https://codecov.io/gh/dubbo/go-for-apache-dubbo) +[](https://travis-ci.com/apache/dubbo-go) +[](https://codecov.io/gh/apache/dubbo-go) --- Apache Dubbo Go Implementation. @@ -12,7 +12,7 @@ Apache License, Version 2.0 ## Release note ## -[v1.0.0 - May 29, 2019 compatible with dubbo v2.6.5](https://github.com/dubbo/go-for-apache-dubbo/releases/tag/v1.0.0) +[v1.0.0 - May 29, 2019 compatible with dubbo v2.6.5](https://github.com/apache/dubbo-go/releases/tag/v1.0.0) ## Project Architecture ## @@ -20,7 +20,7 @@ Extension module and layered code design based on dubbo (include protocol layer,  -About detail design please refer to [code layered design](https://github.com/dubbo/go-for-apache-dubbo/wiki/dubbo-go-V1.0-design) +About detail design please refer to [code layered design](https://github.com/apache/dubbo-go/wiki/dubbo-go-V1.0-design) ## Feature list ## @@ -48,23 +48,23 @@ Todo List: - dynamic configuration center & metadata center (dubbo v2.7.x) - tracing (dubbo ecosystem) -You can know more about dubbo-go by its [roadmap](https://github.com/dubbo/go-for-apache-dubbo/wiki/Roadmap). +You can know more about dubbo-go by its [roadmap](https://github.com/apache/dubbo-go/wiki/Roadmap). ## Quick Start -The subdirectory examples shows how to use dubbo-go. Please read the [examples/README.md](https://github.com/dubbo/go-for-apache-dubbo/blob/develop/examples/README.md) carefully to learn how to dispose the configuration and compile the program. +The subdirectory examples shows how to use dubbo-go. Please read the [examples/README.md](https://github.com/apache/dubbo-go/blob/develop/examples/README.md) carefully to learn how to dispose the configuration and compile the program. ## Benchmark Benchmark project please refer to [go-for-apache-dubbo-benchmark](https://github.com/dubbogo/go-for-apache-dubbo-benchmark) -About dubbo-go benchmarking report, please refer to [dubbo benchmarking report](https://github.com/dubbo/go-for-apache-dubbo/wiki/pressure-test-report-for-dubbo) & [jsonrpc benchmarking report](https://github.com/dubbo/go-for-apache-dubbo/wiki/pressure-test-report-for-jsonrpc) +About dubbo-go benchmarking report, please refer to [dubbo benchmarking report](https://github.com/apache/dubbo-go/wiki/pressure-test-report-for-dubbo) & [jsonrpc benchmarking report](https://github.com/apache/dubbo-go/wiki/pressure-test-report-for-jsonrpc) -## [User List](https://github.com/dubbo/go-for-apache-dubbo/issues/2) +## [User List](https://github.com/apache/dubbo-go/issues/2)  ## Stargazers -[](https://starchart.cc/dubbo/dubbo-go) +[](https://starchart.cc/apache/dubbo-go) diff --git a/README_CN.md b/README_CN.md index 4b0d40f54dcd60b8b56822bddd10773b8b3680c1..656ea286d54cff66c68659fb6a107213809c4eb3 100644 --- a/README_CN.md +++ b/README_CN.md @@ -1,7 +1,7 @@ # Go for Apache Dubbo [English](./README.md) # -[](https://travis-ci.com/dubbo/go-for-apache-dubbo) -[](https://codecov.io/gh/dubbo/go-for-apache-dubbo) +[](https://travis-ci.com/apache/dubbo-go) +[](https://codecov.io/gh/apache/dubbo-go) --- Apache Dubbo Go 璇█瀹炵幇 @@ -12,7 +12,7 @@ Apache License, Version 2.0 ## 鍙戝竷鏃ュ織 ## -[v1.0.0 - 2019骞�5鏈�29鏃� 鍏煎dubbo v2.6.5 鐗堟湰](https://github.com/dubbo/go-for-apache-dubbo/releases/tag/v1.0.0) +[v1.0.0 - 2019骞�5鏈�29鏃� 鍏煎dubbo v2.6.5 鐗堟湰](https://github.com/apache/dubbo-go/releases/tag/v1.0.0) ## 宸ョ▼鏋舵瀯 ## @@ -20,7 +20,7 @@ Apache License, Version 2.0  -鍏充簬璇︾粏璁捐璇烽槄璇� [code layered design](https://github.com/dubbo/go-for-apache-dubbo/wiki/dubbo-go-V1.0-design) +鍏充簬璇︾粏璁捐璇烽槄璇� [code layered design](https://github.com/apache/dubbo-go/wiki/dubbo-go-V1.0-design) ## 鍔熻兘鍒楄〃 ## @@ -48,23 +48,23 @@ Apache License, Version 2.0 - dynamic configuration center & metadata center (dubbo v2.7.x) - tracing (dubbo ecosystem) -浣犲彲浠ラ€氳繃璁块棶 [roadmap](https://github.com/dubbo/go-for-apache-dubbo/wiki/Roadmap) 鐭ラ亾鏇村鍏充簬 dubbo-go 鐨勪俊鎭� +浣犲彲浠ラ€氳繃璁块棶 [roadmap](https://github.com/apache/dubbo-go/wiki/Roadmap) 鐭ラ亾鏇村鍏充簬 dubbo-go 鐨勪俊鎭� ## 蹇€熷紑濮� ## -杩欎釜瀛愮洰褰曚笅鐨勪緥瀛愬睍绀轰簡濡備綍浣跨敤 dubbo-go 銆傝浠旂粏闃呰 [examples/README.md](https://github.com/dubbo/go-for-apache-dubbo/blob/develop/examples/README.md) 瀛︿範濡備綍澶勭悊閰嶇疆骞剁紪璇戠▼搴忋€� +杩欎釜瀛愮洰褰曚笅鐨勪緥瀛愬睍绀轰簡濡備綍浣跨敤 dubbo-go 銆傝浠旂粏闃呰 [examples/README.md](https://github.com/apache/dubbo-go/blob/develop/examples/README.md) 瀛︿範濡備綍澶勭悊閰嶇疆骞剁紪璇戠▼搴忋€� ## 鎬ц兘娴嬭瘯 ## 鎬ц兘娴嬭瘯椤圭洰鏄� [go-for-apache-dubbo-benchmark](https://github.com/dubbogo/go-for-apache-dubbo-benchmark) -鍏充簬 dubbo-go 鎬ц兘娴嬭瘯鎶ュ憡锛岃闃呰 [dubbo benchmarking report](https://github.com/dubbo/go-for-apache-dubbo/wiki/pressure-test-report-for-dubbo) & [jsonrpc benchmarking report](https://github.com/dubbo/go-for-apache-dubbo/wiki/pressure-test-report-for-jsonrpc) +鍏充簬 dubbo-go 鎬ц兘娴嬭瘯鎶ュ憡锛岃闃呰 [dubbo benchmarking report](https://github.com/apache/dubbo-go/wiki/pressure-test-report-for-dubbo) & [jsonrpc benchmarking report](https://github.com/apache/dubbo-go/wiki/pressure-test-report-for-jsonrpc) -## [User List](https://github.com/dubbo/go-for-apache-dubbo/issues/2) +## [User List](https://github.com/apache/dubbo-go/issues/2)  ## Stargazers -[](https://starchart.cc/dubbo/dubbo-go) +[](https://starchart.cc/apache/dubbo-go) diff --git a/cluster/cluster.go b/cluster/cluster.go index a9a6c2e5972f44c50180f39c42f27b6aa681546f..d89df5a21954d63552b857d988fa9a9e7d1fcfb5 100644 --- a/cluster/cluster.go +++ b/cluster/cluster.go @@ -1,20 +1,25 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 cluster -import "github.com/dubbo/go-for-apache-dubbo/protocol" +import ( + "github.com/apache/dubbo-go/protocol" +) type Cluster interface { Join(Directory) protocol.Invoker diff --git a/cluster/cluster_impl/base_cluster_invoker.go b/cluster/cluster_impl/base_cluster_invoker.go index 3b0c587cce9eba4825fdb566c3c790c41c805c09..6cbed7748e496afb37f9a1e93dbc40e845c62b06 100644 --- a/cluster/cluster_impl/base_cluster_invoker.go +++ b/cluster/cluster_impl/base_cluster_invoker.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 cluster_impl @@ -20,11 +23,11 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/cluster" - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/utils" - "github.com/dubbo/go-for-apache-dubbo/protocol" - "github.com/dubbo/go-for-apache-dubbo/version" + "github.com/apache/dubbo-go/cluster" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/utils" + "github.com/apache/dubbo-go/protocol" + "github.com/apache/dubbo-go/version" ) type baseClusterInvoker struct { diff --git a/cluster/cluster_impl/failover_cluster.go b/cluster/cluster_impl/failover_cluster.go index 2f2bfdfe36e2943a9757b46c3218116e583a01d6..0f1aa0371f57df5414a04a59e2a6772a4cd382b3 100644 --- a/cluster/cluster_impl/failover_cluster.go +++ b/cluster/cluster_impl/failover_cluster.go @@ -1,27 +1,29 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 cluster_impl import ( - "github.com/dubbo/go-for-apache-dubbo/cluster" - "github.com/dubbo/go-for-apache-dubbo/common/extension" - "github.com/dubbo/go-for-apache-dubbo/protocol" + "github.com/apache/dubbo-go/cluster" + "github.com/apache/dubbo-go/common/extension" + "github.com/apache/dubbo-go/protocol" ) -type failoverCluster struct { -} +type failoverCluster struct{} const name = "failover" diff --git a/cluster/cluster_impl/failover_cluster_invoker.go b/cluster/cluster_impl/failover_cluster_invoker.go index 5bb2471e06c967159196d754fe04158ad3a96c6b..cd17a85e00a1d4307b3b861467051e9719345d1a 100644 --- a/cluster/cluster_impl/failover_cluster_invoker.go +++ b/cluster/cluster_impl/failover_cluster_invoker.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 cluster_impl @@ -19,12 +22,12 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/cluster" - "github.com/dubbo/go-for-apache-dubbo/common/constant" - "github.com/dubbo/go-for-apache-dubbo/common/extension" - "github.com/dubbo/go-for-apache-dubbo/common/utils" - "github.com/dubbo/go-for-apache-dubbo/protocol" - "github.com/dubbo/go-for-apache-dubbo/version" + "github.com/apache/dubbo-go/cluster" + "github.com/apache/dubbo-go/common/constant" + "github.com/apache/dubbo-go/common/extension" + "github.com/apache/dubbo-go/common/utils" + "github.com/apache/dubbo-go/protocol" + "github.com/apache/dubbo-go/version" ) type failoverClusterInvoker struct { diff --git a/cluster/cluster_impl/failover_cluster_test.go b/cluster/cluster_impl/failover_cluster_test.go index 5f0a28f0a679c42b6cd5fd2b9a9052a4722c0737..cc533ea098ee76488d2f76cbbe601b275274db83 100644 --- a/cluster/cluster_impl/failover_cluster_test.go +++ b/cluster/cluster_impl/failover_cluster_test.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 cluster_impl @@ -26,14 +29,14 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/cluster/directory" - "github.com/dubbo/go-for-apache-dubbo/cluster/loadbalance" - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/constant" - "github.com/dubbo/go-for-apache-dubbo/common/extension" - "github.com/dubbo/go-for-apache-dubbo/common/logger" - "github.com/dubbo/go-for-apache-dubbo/protocol" - "github.com/dubbo/go-for-apache-dubbo/protocol/invocation" + "github.com/apache/dubbo-go/cluster/directory" + "github.com/apache/dubbo-go/cluster/loadbalance" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/constant" + "github.com/apache/dubbo-go/common/extension" + "github.com/apache/dubbo-go/common/logger" + "github.com/apache/dubbo-go/protocol" + "github.com/apache/dubbo-go/protocol/invocation" ) ///////////////////////////// diff --git a/cluster/cluster_impl/mock_cluster.go b/cluster/cluster_impl/mock_cluster.go index f913eb6827b56aa1795df593fee38aaedf4bded6..50b2735554b61600fb090f382f3d2920b3d445e3 100644 --- a/cluster/cluster_impl/mock_cluster.go +++ b/cluster/cluster_impl/mock_cluster.go @@ -1,26 +1,28 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 cluster_impl import ( - "github.com/dubbo/go-for-apache-dubbo/cluster" - "github.com/dubbo/go-for-apache-dubbo/protocol" + "github.com/apache/dubbo-go/cluster" + "github.com/apache/dubbo-go/protocol" ) -type mockCluster struct { -} +type mockCluster struct{} func NewMockCluster() cluster.Cluster { return &mockCluster{} diff --git a/cluster/cluster_impl/registry_aware_cluster.go b/cluster/cluster_impl/registry_aware_cluster.go index 9f897bdf59c9b32794a7fe3038ee27e272f891e2..f4a28d6dcd5fbab8c62ee1f79bdd8576d8774a4c 100644 --- a/cluster/cluster_impl/registry_aware_cluster.go +++ b/cluster/cluster_impl/registry_aware_cluster.go @@ -1,27 +1,29 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 cluster_impl import ( - "github.com/dubbo/go-for-apache-dubbo/cluster" - "github.com/dubbo/go-for-apache-dubbo/common/extension" - "github.com/dubbo/go-for-apache-dubbo/protocol" + "github.com/apache/dubbo-go/cluster" + "github.com/apache/dubbo-go/common/extension" + "github.com/apache/dubbo-go/protocol" ) -type registryAwareCluster struct { -} +type registryAwareCluster struct{} func init() { extension.SetCluster("registryAware", NewRegistryAwareCluster) diff --git a/cluster/cluster_impl/registry_aware_cluster_invoker.go b/cluster/cluster_impl/registry_aware_cluster_invoker.go index 975ff8bdad63243188130b5772f2293c0b4e24de..5785c02489f95168d5419f0087f38b07c851a4a3 100644 --- a/cluster/cluster_impl/registry_aware_cluster_invoker.go +++ b/cluster/cluster_impl/registry_aware_cluster_invoker.go @@ -1,23 +1,26 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 cluster_impl import ( - "github.com/dubbo/go-for-apache-dubbo/cluster" - "github.com/dubbo/go-for-apache-dubbo/common/constant" - "github.com/dubbo/go-for-apache-dubbo/protocol" + "github.com/apache/dubbo-go/cluster" + "github.com/apache/dubbo-go/common/constant" + "github.com/apache/dubbo-go/protocol" ) type registryAwareClusterInvoker struct { diff --git a/cluster/cluster_impl/registry_aware_cluster_test.go b/cluster/cluster_impl/registry_aware_cluster_test.go index 51734116a696303f4079c06ff361b200234e3aa9..4ae15cc5066c70646dee66cf4ef601202653cb07 100644 --- a/cluster/cluster_impl/registry_aware_cluster_test.go +++ b/cluster/cluster_impl/registry_aware_cluster_test.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 cluster_impl @@ -24,10 +27,10 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/cluster/directory" - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/protocol" - "github.com/dubbo/go-for-apache-dubbo/protocol/invocation" + "github.com/apache/dubbo-go/cluster/directory" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/protocol" + "github.com/apache/dubbo-go/protocol/invocation" ) func Test_RegAwareInvokeSuccess(t *testing.T) { diff --git a/cluster/directory.go b/cluster/directory.go index 9a055d6f580e622a68e648de0a0b2e3999773752..045296ce549b13c327b6f479ca0bd75d0b6ce131 100644 --- a/cluster/directory.go +++ b/cluster/directory.go @@ -1,22 +1,25 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 cluster import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/protocol" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/protocol" ) // Extension - Directory diff --git a/cluster/directory/base_directory.go b/cluster/directory/base_directory.go index ef74c3511ca1b57fac91249c9b02aa94cb8a1f78..b2011977140f34d7e86d1414b7ced2d7cda23e9b 100644 --- a/cluster/directory/base_directory.go +++ b/cluster/directory/base_directory.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 directory @@ -21,7 +24,7 @@ import ( "go.uber.org/atomic" ) import ( - "github.com/dubbo/go-for-apache-dubbo/common" + "github.com/apache/dubbo-go/common" ) type BaseDirectory struct { diff --git a/cluster/directory/static_directory.go b/cluster/directory/static_directory.go index 3ac567b00e37fae3923753a7577121e7a341ae1f..e7a0e6e569db620ee83521505c9568199d45fe1e 100644 --- a/cluster/directory/static_directory.go +++ b/cluster/directory/static_directory.go @@ -1,22 +1,25 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 directory import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/protocol" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/protocol" ) type staticDirectory struct { diff --git a/cluster/directory/static_directory_test.go b/cluster/directory/static_directory_test.go index 929d23edefd3821ae8f6c48a3706f6036b9238d8..3ce772e8a6287aebef3fdad039e2b12be421c4e3 100644 --- a/cluster/directory/static_directory_test.go +++ b/cluster/directory/static_directory_test.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 directory @@ -25,9 +28,9 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/protocol" - "github.com/dubbo/go-for-apache-dubbo/protocol/invocation" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/protocol" + "github.com/apache/dubbo-go/protocol/invocation" ) func Test_StaticDirList(t *testing.T) { diff --git a/cluster/loadbalance.go b/cluster/loadbalance.go index 897c7952f63047eb2a2237a0cd6baba3c6cb2dc2..9ae4e4eb808b28581d12b72829c921c4f0cc9ac8 100644 --- a/cluster/loadbalance.go +++ b/cluster/loadbalance.go @@ -1,21 +1,24 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 cluster import ( - "github.com/dubbo/go-for-apache-dubbo/protocol" + "github.com/apache/dubbo-go/protocol" ) // Extension - LoadBalance diff --git a/cluster/loadbalance/random.go b/cluster/loadbalance/random.go index 992a8dfc35be600d29663aebf59e665a681025e3..919792162dc527fa8c1e5cf2911f2933fa8232ef 100644 --- a/cluster/loadbalance/random.go +++ b/cluster/loadbalance/random.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 loadbalance @@ -19,12 +22,14 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/cluster" - "github.com/dubbo/go-for-apache-dubbo/common/extension" - "github.com/dubbo/go-for-apache-dubbo/protocol" + "github.com/apache/dubbo-go/cluster" + "github.com/apache/dubbo-go/common/extension" + "github.com/apache/dubbo-go/protocol" ) -const name = "random" +const ( + name = "random" +) func init() { extension.SetLoadbalance(name, NewRandomLoadBalance) diff --git a/cluster/loadbalance/random_test.go b/cluster/loadbalance/random_test.go index 5b94f6b27218cf7a7b8000ecd2c2c1121b5a8ffd..09d3d259a903693e9c0550965fc12d2089228662 100644 --- a/cluster/loadbalance/random_test.go +++ b/cluster/loadbalance/random_test.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 loadbalance @@ -28,10 +31,10 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/constant" - "github.com/dubbo/go-for-apache-dubbo/protocol" - "github.com/dubbo/go-for-apache-dubbo/protocol/invocation" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/constant" + "github.com/apache/dubbo-go/protocol" + "github.com/apache/dubbo-go/protocol/invocation" ) func Test_RandomlbSelect(t *testing.T) { diff --git a/cluster/loadbalance/util.go b/cluster/loadbalance/util.go index fdbeb14dd31fa8b2581f46d3adacf5355b12878b..736952159d83a9f4ade2c2d0cb190b60f1ef3fbe 100644 --- a/cluster/loadbalance/util.go +++ b/cluster/loadbalance/util.go @@ -1,25 +1,29 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 loadbalance import ( "time" ) + import ( - "github.com/dubbo/go-for-apache-dubbo/common/constant" - "github.com/dubbo/go-for-apache-dubbo/protocol" + "github.com/apache/dubbo-go/common/constant" + "github.com/apache/dubbo-go/protocol" ) func GetWeight(invoker protocol.Invoker, invocation protocol.Invocation) int64 { diff --git a/cluster/router.go b/cluster/router.go index a80efaa0b99ad51c1ad5a83b5cff6d3996d2b220..688ab58bdda75dd5f93864692472ab6a6c0cc87f 100644 --- a/cluster/router.go +++ b/cluster/router.go @@ -1,22 +1,25 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 cluster import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/protocol" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/protocol" ) // Extension - Router diff --git a/common/constant/default.go b/common/constant/default.go index 3ee4b1b1a5d607cdd4a6663366f1e6f20f82d0a6..85f61f30f115493d3d520f2a68f36921735055d7 100644 --- a/common/constant/default.go +++ b/common/constant/default.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang, hxmhlt -// -// Licensed 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. +/* + * 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 constant diff --git a/common/constant/env.go b/common/constant/env.go index 23fd9880afc932a99a411b099582459dfe1f7d16..f0e4fabe02cb09f63173bc9fe0cbf83885bdefb6 100644 --- a/common/constant/env.go +++ b/common/constant/env.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 constant diff --git a/common/constant/key.go b/common/constant/key.go index 5352c00f67f9d4fa7a6ce54e8c424ccd2cabd3d8..985dd4f80f531c107ef11cee1282da8742d7d62a 100644 --- a/common/constant/key.go +++ b/common/constant/key.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 hxmhlt, Yincheg Fang -// -// Licensed 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. +/* + * 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 constant diff --git a/common/extension/cluster.go b/common/extension/cluster.go index 54b5ac59d31950c7ac42d81856f11c28f4716a19..91e9f953b505e31c1a4f448e1504a6ae50a9663f 100644 --- a/common/extension/cluster.go +++ b/common/extension/cluster.go @@ -1,21 +1,24 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 extension import ( - "github.com/dubbo/go-for-apache-dubbo/cluster" + "github.com/apache/dubbo-go/cluster" ) var ( diff --git a/common/extension/filter.go b/common/extension/filter.go index 263b67eae4023bdca49af4f1197af7f19ba3dab0..d6c7f6f694cc9888bd63c1d123bc57ee86f15e1f 100644 --- a/common/extension/filter.go +++ b/common/extension/filter.go @@ -1,21 +1,24 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 extension import ( - "github.com/dubbo/go-for-apache-dubbo/filter" + "github.com/apache/dubbo-go/filter" ) var ( diff --git a/common/extension/loadbalance.go b/common/extension/loadbalance.go index bb46c8283386351bfb8f789bedabd0fbd5e7b43d..f1f97b9399a2b33a3e06213fc0b2f84e73b002b7 100644 --- a/common/extension/loadbalance.go +++ b/common/extension/loadbalance.go @@ -1,20 +1,25 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 extension -import "github.com/dubbo/go-for-apache-dubbo/cluster" +import ( + "github.com/apache/dubbo-go/cluster" +) var ( loadbalances = make(map[string]func() cluster.LoadBalance) @@ -28,5 +33,6 @@ func GetLoadbalance(name string) cluster.LoadBalance { if loadbalances[name] == nil { panic("loadbalance for " + name + " is not existing, make sure you have import the package.") } + return loadbalances[name]() } diff --git a/common/extension/protocol.go b/common/extension/protocol.go index f1ddbdeef8bb3de0207befaf3ec7063571723513..50d339476d024c04b182c38632689a99bc5c1680 100644 --- a/common/extension/protocol.go +++ b/common/extension/protocol.go @@ -1,21 +1,24 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 extension import ( - "github.com/dubbo/go-for-apache-dubbo/protocol" + "github.com/apache/dubbo-go/protocol" ) var ( diff --git a/common/extension/proxy_factory.go b/common/extension/proxy_factory.go index 8795ea8f975237c4d263053fb67052d5b98cff84..53cbbee54054bf8ad87964393b01ca6601106066 100644 --- a/common/extension/proxy_factory.go +++ b/common/extension/proxy_factory.go @@ -1,6 +1,25 @@ +/* + * 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 extension -import "github.com/dubbo/go-for-apache-dubbo/common/proxy" +import ( + "github.com/apache/dubbo-go/common/proxy" +) var ( proxy_factories = make(map[string]func(...proxy.Option) proxy.ProxyFactory) diff --git a/common/extension/registry.go b/common/extension/registry.go index d6cacd88028bf96697e11525098454d741784351..776c2b5df542e56f8c120c850f20093a971d8602 100644 --- a/common/extension/registry.go +++ b/common/extension/registry.go @@ -1,22 +1,25 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 extension import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/registry" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/registry" ) var ( diff --git a/common/logger/log.yml b/common/logger/log.yml index 427308d52b028d1740dac56b66b2e54fa76c6fe2..59fa4279ad85272c4c49d532beaf23b74d00f58a 100644 --- a/common/logger/log.yml +++ b/common/logger/log.yml @@ -22,7 +22,7 @@ encoderConfig: nameEncoder: "" outputPaths: -- "stderr" + - "stderr" errorOutputPaths: -- "stderr" + - "stderr" initialFields: diff --git a/common/logger/logger.go b/common/logger/logger.go index 22fe7329e7601b9e3701ad51c9da2eaa937a7d27..f6522c489d047a1d4ec7000565bf4cfda6a50466 100644 --- a/common/logger/logger.go +++ b/common/logger/logger.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 logger @@ -30,7 +33,7 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common/constant" + "github.com/apache/dubbo-go/common/constant" ) var ( diff --git a/common/logger/logger_test.go b/common/logger/logger_test.go index 9256aa417ae44d1ccdcc82a90abafebdf3581e79..ed963ce54dcabfbf9f35f8a9f8b94723766617c9 100644 --- a/common/logger/logger_test.go +++ b/common/logger/logger_test.go @@ -1,9 +1,27 @@ +/* + * 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 logger import ( - "github.com/stretchr/testify/assert" "path/filepath" "testing" + + "github.com/stretchr/testify/assert" ) func TestInitLog(t *testing.T) { diff --git a/common/logger/logging.go b/common/logger/logging.go index 57a0e04e42252d343391cbfe04fd4edef92da3f0..4638c9a41dfe986d256e1ff4d52b690c1747fc94 100644 --- a/common/logger/logging.go +++ b/common/logger/logging.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 logger diff --git a/common/node.go b/common/node.go index fb409e5cee177f2b927afd84bda7b333549511eb..992ead38d8acf85bbb14f02eebca4c4fe5a0a1e2 100644 --- a/common/node.go +++ b/common/node.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 diff --git a/common/proxy/proxy.go b/common/proxy/proxy.go index 033c8687ee25d4ded826b9a6a1315608b7b8c4ab..fe4c003306360af928a0b1a6612042e9811a9af3 100644 --- a/common/proxy/proxy.go +++ b/common/proxy/proxy.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 proxy @@ -19,10 +22,10 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/logger" - "github.com/dubbo/go-for-apache-dubbo/protocol" - invocation_impl "github.com/dubbo/go-for-apache-dubbo/protocol/invocation" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/logger" + "github.com/apache/dubbo-go/protocol" + invocation_impl "github.com/apache/dubbo-go/protocol/invocation" ) // Proxy struct diff --git a/common/proxy/proxy_factory.go b/common/proxy/proxy_factory.go index 4d7fa52b7451b0c014d2ffdc3f0383acb6c777d4..2567e0ee09cf7fa5aef7fde46872eb88205d8e45 100644 --- a/common/proxy/proxy_factory.go +++ b/common/proxy/proxy_factory.go @@ -1,21 +1,25 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 proxy import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/protocol" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/protocol" ) type ProxyFactory interface { diff --git a/common/proxy/proxy_factory/default.go b/common/proxy/proxy_factory/default.go index 54ba45392bea7bcbb578178845ca781dbffe3cb5..016bbcf514514e3bea67d87c83f01aebb166be23 100644 --- a/common/proxy/proxy_factory/default.go +++ b/common/proxy/proxy_factory/default.go @@ -1,24 +1,28 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 proxy_factory import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/constant" - "github.com/dubbo/go-for-apache-dubbo/common/extension" - "github.com/dubbo/go-for-apache-dubbo/common/proxy" - "github.com/dubbo/go-for-apache-dubbo/protocol" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/constant" + "github.com/apache/dubbo-go/common/extension" + "github.com/apache/dubbo-go/common/proxy" + "github.com/apache/dubbo-go/protocol" ) func init() { diff --git a/common/proxy/proxy_factory/default_test.go b/common/proxy/proxy_factory/default_test.go index 385dfee636a5422ca81deee39b1195201c6edd3c..d9c8ffa2525551fc0197e2476e85b5ee51a18ec6 100644 --- a/common/proxy/proxy_factory/default_test.go +++ b/common/proxy/proxy_factory/default_test.go @@ -1,25 +1,32 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 proxy_factory import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/protocol" - "github.com/stretchr/testify/assert" "testing" ) +import ( + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/protocol" + "github.com/stretchr/testify/assert" +) + func Test_GetProxy(t *testing.T) { proxyFactory := NewDefaultProxyFactory() url := common.NewURLWithOptions("testservice") diff --git a/common/proxy/proxy_test.go b/common/proxy/proxy_test.go index 6a12af8a70552ec5348d75f9c57bec31670806ad..44bdaec4b845a3a864c8637ced16ac4493fc2b80 100644 --- a/common/proxy/proxy_test.go +++ b/common/proxy/proxy_test.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 proxy @@ -26,9 +29,9 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/constant" - "github.com/dubbo/go-for-apache-dubbo/protocol" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/constant" + "github.com/apache/dubbo-go/protocol" ) type TestService struct { diff --git a/common/rpc_service.go b/common/rpc_service.go index 3a215ab17a7c156fda7d19be3b86255d8ef06138..d8578a143eccb05696e633cc3fd61dd6f00c3bc7 100644 --- a/common/rpc_service.go +++ b/common/rpc_service.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 @@ -28,7 +31,7 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common/logger" + "github.com/apache/dubbo-go/common/logger" ) // rpc service interface diff --git a/common/rpc_service_test.go b/common/rpc_service_test.go index 41476149c09d0d44140717076c7fc8c13152b348..e5bab2c7153daeb34068c2005def6811b8478532 100644 --- a/common/rpc_service_test.go +++ b/common/rpc_service_test.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 diff --git a/common/url.go b/common/url.go index 9ea3e0b09179a576bd7aac3f4601e6f61c437f47..115167ee3ebab6718dfd8a229f2a370e5b79a982 100644 --- a/common/url.go +++ b/common/url.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 @@ -28,7 +31,7 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common/constant" + "github.com/apache/dubbo-go/common/constant" ) ///////////////////////////////// diff --git a/common/url_test.go b/common/url_test.go index 21c1aeeb15fae9efdee1008acdd22578a70caa5c..1093516ce5f5ccedcee2ab22898e0124eae0eca2 100644 --- a/common/url_test.go +++ b/common/url_test.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 @@ -21,7 +24,7 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common/constant" + "github.com/apache/dubbo-go/common/constant" "github.com/stretchr/testify/assert" ) diff --git a/common/utils/net.go b/common/utils/net.go index b9f1786e2bfea4337d28c0d963940558f6c3ecc2..41d7b9e2e57d3e8ca0e2818da518737b5cf39b3f 100644 --- a/common/utils/net.go +++ b/common/utils/net.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Alex Stocks -// -// Licensed 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. +/* + * 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 utils diff --git a/common/utils/net_test.go b/common/utils/net_test.go index 5230d8d9c91f37d79e2d846f243ca1fcb68d758a..d50c437f8462f9ac8cc2b64df136d5d9aed67c8a 100644 --- a/common/utils/net_test.go +++ b/common/utils/net_test.go @@ -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 utils import ( diff --git a/common/utils/strings.go b/common/utils/strings.go index 1844479fb66e98062e1e3a18dabe6eba14f41d09..ec5d118e9137f1818e1fe64ee3bc90d52080a3a8 100644 --- a/common/utils/strings.go +++ b/common/utils/strings.go @@ -1,6 +1,25 @@ +/* + * 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 utils -import "regexp" +import ( + "regexp" +) func RegSplit(text string, delimeter string) []string { reg := regexp.MustCompile(delimeter) diff --git a/common/utils/strings_test.go b/common/utils/strings_test.go index 73080ab9eef1016d88a7a49063d473aeee2e1ea1..345ffd0c25d4398d63922115061697e148cb0a43 100644 --- a/common/utils/strings_test.go +++ b/common/utils/strings_test.go @@ -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 utils import ( diff --git a/config/application_config.go b/config/application_config.go index f12fdea9f1d332931d646a3a124ef522f6aef5e8..ae9716d2d07a7961b9eed995234025e062496a19 100644 --- a/config/application_config.go +++ b/config/application_config.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 config diff --git a/config/config_loader.go b/config/config_loader.go index 0078dc5b6523d743dd7aa806dea2442a1927bcf7..2560b78bd15686d221cdb7f2e0e613954688e20e 100644 --- a/config/config_loader.go +++ b/config/config_loader.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 config @@ -30,9 +33,9 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common/constant" - "github.com/dubbo/go-for-apache-dubbo/common/logger" - "github.com/dubbo/go-for-apache-dubbo/version" + "github.com/apache/dubbo-go/common/constant" + "github.com/apache/dubbo-go/common/logger" + "github.com/apache/dubbo-go/version" ) var ( diff --git a/config/config_loader_test.go b/config/config_loader_test.go index 0fcd76b95535c09770a0a72e6a8ca8f5f5007d7a..7c3343fd35a1ce9d3e519d3f45435be775755bdf 100644 --- a/config/config_loader_test.go +++ b/config/config_loader_test.go @@ -1,21 +1,23 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 config import ( - "github.com/dubbo/go-for-apache-dubbo/common/proxy/proxy_factory" "path/filepath" "testing" ) @@ -25,9 +27,10 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/cluster/cluster_impl" - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/extension" + "github.com/apache/dubbo-go/cluster/cluster_impl" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/extension" + "github.com/apache/dubbo-go/common/proxy/proxy_factory" ) func TestConfigLoader(t *testing.T) { diff --git a/config/config_utils.go b/config/config_utils.go index 5b2e2053ce5c2aac9312c8112e5c234764b394d1..90837344cae7cead935308e77d350868015f89d4 100644 --- a/config/config_utils.go +++ b/config/config_utils.go @@ -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 config import ( @@ -5,7 +22,7 @@ import ( "strings" ) import ( - "github.com/dubbo/go-for-apache-dubbo/common/constant" + "github.com/apache/dubbo-go/common/constant" ) func mergeValue(str1, str2, def string) string { diff --git a/config/config_utils_test.go b/config/config_utils_test.go index 2c80f9da4f7d5fcc5537acc50cbd307180a0032a..5170b90c83a0f31bbbe1b5de5bca9b8dc5869ac6 100644 --- a/config/config_utils_test.go +++ b/config/config_utils_test.go @@ -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 config import ( diff --git a/config/mock_rpcservice.go b/config/mock_rpcservice.go index 87059ac007d736f19bbeea579a18a41b407a9560..0b3b9f22b497c66067eff5969b8dca044a34735a 100644 --- a/config/mock_rpcservice.go +++ b/config/mock_rpcservice.go @@ -1,33 +1,40 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 config -import "context" +import ( + "context" +) -type MockService struct { -} +type MockService struct{} func (*MockService) Service() string { return "MockService" } + func (*MockService) Version() string { return "1.0" } + func (*MockService) GetUser(ctx context.Context, itf []interface{}, str *struct{}) error { return nil } + func (*MockService) GetUser1(ctx context.Context, itf []interface{}, str *struct{}) error { return nil } diff --git a/config/reference_config.go b/config/reference_config.go index 78db262220a5dca3e0e55d0aef8ed1ce385430f5..e0c93b3e54248e886982dbf49e13a42a063eee77 100644 --- a/config/reference_config.go +++ b/config/reference_config.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 config @@ -23,13 +26,13 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/cluster/directory" - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/constant" - "github.com/dubbo/go-for-apache-dubbo/common/extension" - "github.com/dubbo/go-for-apache-dubbo/common/proxy" - "github.com/dubbo/go-for-apache-dubbo/common/utils" - "github.com/dubbo/go-for-apache-dubbo/protocol" + "github.com/apache/dubbo-go/cluster/directory" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/constant" + "github.com/apache/dubbo-go/common/extension" + "github.com/apache/dubbo-go/common/proxy" + "github.com/apache/dubbo-go/common/utils" + "github.com/apache/dubbo-go/protocol" ) type ReferenceConfig struct { @@ -61,6 +64,7 @@ type ConfigRegistry string func NewReferenceConfig(ctx context.Context) *ReferenceConfig { return &ReferenceConfig{context: ctx} } + func (refconfig *ReferenceConfig) UnmarshalYAML(unmarshal func(interface{}) error) error { type rf ReferenceConfig raw := rf{} // Put your defaults here @@ -71,6 +75,7 @@ func (refconfig *ReferenceConfig) UnmarshalYAML(unmarshal func(interface{}) erro *refconfig = ReferenceConfig(raw) return nil } + func (refconfig *ReferenceConfig) Refer() { url := common.NewURLWithOptions(refconfig.InterfaceName, common.WithProtocol(refconfig.Protocol), common.WithParams(refconfig.getUrlMap())) diff --git a/config/reference_config_test.go b/config/reference_config_test.go index a43c1e61c7d3b024c1e09db738173d9d3371e0ad..fc583605638458a03ab1d2b435429d95ca7ce43d 100644 --- a/config/reference_config_test.go +++ b/config/reference_config_test.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 config @@ -24,10 +27,10 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/cluster/cluster_impl" - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/extension" - "github.com/dubbo/go-for-apache-dubbo/protocol" + "github.com/apache/dubbo-go/cluster/cluster_impl" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/extension" + "github.com/apache/dubbo-go/protocol" ) var regProtocol protocol.Protocol @@ -174,6 +177,7 @@ func Test_ReferMultiP2PWithReg(t *testing.T) { } consumerConfig = nil } + func Test_Implement(t *testing.T) { doInit() extension.SetProtocol("registry", GetProtocol) @@ -186,6 +190,7 @@ func Test_Implement(t *testing.T) { } consumerConfig = nil } + func GetProtocol() protocol.Protocol { if regProtocol != nil { return regProtocol @@ -197,8 +202,7 @@ func newRegistryProtocol() protocol.Protocol { return &mockRegistryProtocol{} } -type mockRegistryProtocol struct { -} +type mockRegistryProtocol struct{} func (*mockRegistryProtocol) Refer(url common.URL) protocol.Invoker { return protocol.NewBaseInvoker(url) @@ -208,6 +212,4 @@ func (*mockRegistryProtocol) Export(invoker protocol.Invoker) protocol.Exporter return protocol.NewBaseExporter("test", invoker, &sync.Map{}) } -func (*mockRegistryProtocol) Destroy() { - -} +func (*mockRegistryProtocol) Destroy() {} diff --git a/config/registry_config.go b/config/registry_config.go index 550b73544fa055b044d5bb4305bdd3624beefd67..6dcf5bde757057df1eeab39c36cf54b142af1f32 100644 --- a/config/registry_config.go +++ b/config/registry_config.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 config @@ -21,9 +24,9 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/constant" - "github.com/dubbo/go-for-apache-dubbo/common/logger" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/constant" + "github.com/apache/dubbo-go/common/logger" ) type RegistryConfig struct { @@ -43,8 +46,12 @@ func loadRegistries(registriesIds []ConfigRegistry, registries []RegistryConfig, for _, registryConf := range registries { if string(registry) == registryConf.Id { - url, err := common.NewURL(context.TODO(), constant.REGISTRY_PROTOCOL+"://"+registryConf.Address, common.WithParams(registryConf.getUrlMap(roleType)), - common.WithUsername(registryConf.Username), common.WithPassword(registryConf.Password), + url, err := common.NewURL( + context.TODO(), + constant.REGISTRY_PROTOCOL+"://"+registryConf.Address, + common.WithParams(registryConf.getUrlMap(roleType)), + common.WithUsername(registryConf.Username), + common.WithPassword(registryConf.Password), ) if err != nil { @@ -66,5 +73,6 @@ func (regconfig *RegistryConfig) getUrlMap(roleType common.RoleType) url.Values urlMap.Set(constant.ROLE_KEY, strconv.Itoa(int(roleType))) urlMap.Set(constant.REGISTRY_KEY, regconfig.Type) urlMap.Set(constant.REGISTRY_TIMEOUT_KEY, regconfig.TimeoutStr) + return urlMap } diff --git a/config/service.go b/config/service.go index 507bee4542a666de63d946509c15e320a876ed8b..0f3356f710dc89f25db102d73026e2bde9b9f466 100644 --- a/config/service.go +++ b/config/service.go @@ -1,21 +1,24 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 config import ( - "github.com/dubbo/go-for-apache-dubbo/common" + "github.com/apache/dubbo-go/common" ) var ( diff --git a/config/service_config.go b/config/service_config.go index 0391a17dd1ef397870ad2fb8288a9b5cbab35bfd..9db0f99facbc69671153a713b5ff4a347e32d749 100644 --- a/config/service_config.go +++ b/config/service_config.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 config @@ -22,16 +25,18 @@ import ( "sync" "time" ) + import ( perrors "github.com/pkg/errors" "go.uber.org/atomic" ) + import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/constant" - "github.com/dubbo/go-for-apache-dubbo/common/extension" - "github.com/dubbo/go-for-apache-dubbo/common/logger" - "github.com/dubbo/go-for-apache-dubbo/protocol" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/constant" + "github.com/apache/dubbo-go/common/extension" + "github.com/apache/dubbo-go/common/logger" + "github.com/apache/dubbo-go/protocol" ) type ServiceConfig struct { diff --git a/config/service_config_test.go b/config/service_config_test.go index bed7cc5b954c21f9700bff6424ac7c73e7f69df3..77cbbff386fcee1e27b59bc7e2718a8d1929af38 100644 --- a/config/service_config_test.go +++ b/config/service_config_test.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 config @@ -23,7 +26,7 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common/extension" + "github.com/apache/dubbo-go/common/extension" ) func doinit() { @@ -114,6 +117,7 @@ func doinit() { }, } } + func Test_Export(t *testing.T) { doinit() extension.SetProtocol("registry", GetProtocol) diff --git a/config/testdata/consumer_config.yml b/config/testdata/consumer_config.yml index db242c95ad1f1eae32f2e84166263860c2030b48..9095c44d4f821119e85e2225a5ee858abbea80a5 100644 --- a/config/testdata/consumer_config.yml +++ b/config/testdata/consumer_config.yml @@ -17,32 +17,32 @@ application_config: environment : "dev" registries : -- id: "hangzhouzk" - type: "zookeeper" - timeout : "3s" - address: "127.0.0.1:2181" - username: "" - password: "" + - id: "hangzhouzk" + type: "zookeeper" + timeout : "3s" + address: "127.0.0.1:2181" + username: "" + password: "" -- id: "shanghaizk" - type: "zookeeper" - timeout : "3s" - address: "127.0.0.1:2182" - username: "" - password: "" + - id: "shanghaizk" + type: "zookeeper" + timeout : "3s" + address: "127.0.0.1:2182" + username: "" + password: "" references: -- registries : - - "hangzhouzk" - - "shanghaizk" - filter: "" - protocol : "dubbo" - interface : "com.ikurento.user.UserProvider" - url: "dubbo://127.0.0.1:20000" - cluster: "failover" - methods : - - name: "GetUser" - retries: 3 + - registries : + - "hangzhouzk" + - "shanghaizk" + filter: "" + protocol : "dubbo" + interface : "com.ikurento.user.UserProvider" + url: "dubbo://127.0.0.1:20000" + cluster: "failover" + methods : + - name: "GetUser" + retries: 3 protocol_conf: dubbo: diff --git a/config/testdata/provider_config.yml b/config/testdata/provider_config.yml index 6c7da063695886c934eb92a300135f5374a0aa7f..b02384798fc06f7d7e6e9ca919315a09dd1d47da 100644 --- a/config/testdata/provider_config.yml +++ b/config/testdata/provider_config.yml @@ -11,45 +11,45 @@ application_config: environment : "dev" registries : -- id: "hangzhouzk" - type: "zookeeper" - timeout : "3s" - address: "127.0.0.1:2181" - username: "" - password: "" + - id: "hangzhouzk" + type: "zookeeper" + timeout : "3s" + address: "127.0.0.1:2181" + username: "" + password: "" -- id: "shanghaizk" - type: "zookeeper" - timeout : "3s" - address: "127.0.0.1:2182" - username: "" - password: "" + - id: "shanghaizk" + type: "zookeeper" + timeout : "3s" + address: "127.0.0.1:2182" + username: "" + password: "" services: -- registries: - - "hangzhouzk" - - "shanghaizk" - filter: "" - protocol : "dubbo" - # equivalent to interface of dubbo.xml - interface : "com.ikurento.user.UserProvider" - loadbalance: "random" - warmup: "100" - cluster: "failover" - methods: - - name: "GetUser" - retries: 1 + - registries: + - "hangzhouzk" + - "shanghaizk" + filter: "" + protocol : "dubbo" + # equivalent to interface of dubbo.xml + interface : "com.ikurento.user.UserProvider" loadbalance: "random" + warmup: "100" + cluster: "failover" + methods: + - name: "GetUser" + retries: 1 + loadbalance: "random" protocols: -- name: "dubbo" - # while using dubbo protocol, ip cannot is 127.0.0.1, because client of java-dubbo will get 'connection refuse' - ip : "127.0.0.1" - port : 20000 -#- name: "jsonrpc" -# ip: "127.0.0.1" -# port: 20001 + - name: "dubbo" + # while using dubbo protocol, ip cannot is 127.0.0.1, because client of java-dubbo will get 'connection refuse' + ip : "127.0.0.1" + port : 20000 + #- name: "jsonrpc" + # ip: "127.0.0.1" + # port: 20001 protocol_conf: dubbo: diff --git a/examples/dubbo/go-client/app/client.go b/examples/dubbo/go-client/app/client.go index 89559f0b93a77aefa95b96a2428d45b6bbc3b2d7..6167fbc8e7b0743f807775d1c414110159d01449 100644 --- a/examples/dubbo/go-client/app/client.go +++ b/examples/dubbo/go-client/app/client.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang, Alex Stocks -// -// Licensed 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. +/* + * 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 main @@ -28,17 +31,17 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common/logger" - _ "github.com/dubbo/go-for-apache-dubbo/common/proxy/proxy_factory" - "github.com/dubbo/go-for-apache-dubbo/config" - _ "github.com/dubbo/go-for-apache-dubbo/protocol/dubbo" - _ "github.com/dubbo/go-for-apache-dubbo/registry/protocol" + "github.com/apache/dubbo-go/common/logger" + _ "github.com/apache/dubbo-go/common/proxy/proxy_factory" + "github.com/apache/dubbo-go/config" + _ "github.com/apache/dubbo-go/protocol/dubbo" + _ "github.com/apache/dubbo-go/registry/protocol" - _ "github.com/dubbo/go-for-apache-dubbo/filter/impl" + _ "github.com/apache/dubbo-go/filter/impl" - _ "github.com/dubbo/go-for-apache-dubbo/cluster/cluster_impl" - _ "github.com/dubbo/go-for-apache-dubbo/cluster/loadbalance" - _ "github.com/dubbo/go-for-apache-dubbo/registry/zookeeper" + _ "github.com/apache/dubbo-go/cluster/cluster_impl" + _ "github.com/apache/dubbo-go/cluster/loadbalance" + _ "github.com/apache/dubbo-go/registry/zookeeper" ) var ( diff --git a/examples/dubbo/go-client/app/user.go b/examples/dubbo/go-client/app/user.go index 65fc30f1790100b73e61bb3c00193d62ebc5240e..ee56e23ba33e3875f58d17024747fb212cd5e1ad 100644 --- a/examples/dubbo/go-client/app/user.go +++ b/examples/dubbo/go-client/app/user.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang, Alex Stocks -// -// Licensed 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. +/* + * 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 main @@ -22,11 +25,8 @@ import ( ) import ( - "github.com/dubbogo/hessian2" -) - -import ( - "github.com/dubbo/go-for-apache-dubbo/config" + "github.com/apache/dubbo-go/config" + hessian "github.com/dubbogo/hessian2" ) type Gender hessian.JavaEnum diff --git a/examples/dubbo/go-client/app/version.go b/examples/dubbo/go-client/app/version.go index 33bb9cd02dd53fdbd84f9f96942cf2dc9c1ef115..c6138584f1ddeab3a4927774f44f9e78a8f08da7 100644 --- a/examples/dubbo/go-client/app/version.go +++ b/examples/dubbo/go-client/app/version.go @@ -1,5 +1,22 @@ +/* + * 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 main var ( - Version = "0.3.1" + Version = "2.6.0" ) diff --git a/examples/dubbo/go-client/assembly/common/build.sh b/examples/dubbo/go-client/assembly/common/build.sh index 00763725b821e54dd0f378b0ec60757837067ef9..e72418297ad2f0ac6985476b5a8d5e03b9e7584e 100644 --- a/examples/dubbo/go-client/assembly/common/build.sh +++ b/examples/dubbo/go-client/assembly/common/build.sh @@ -15,7 +15,7 @@ PROJECT_HOME=`pwd` TARGET_FOLDER=${PROJECT_HOME}/target/${GOOS} TARGET_SBIN_NAME=${TARGET_EXEC_NAME} -version=`cat app/version.go | grep Version | awk -F '=' '{print $2}' | awk -F '"' '{print $2}'` +version=`cat app/version.go | grep Version | grep -v "Apache" | awk -F '=' '{print $2}' | awk -F '"' '{print $2}'` if [[ ${GOOS} == "windows" ]]; then TARGET_SBIN_NAME=${TARGET_SBIN_NAME}.exe fi diff --git a/examples/dubbo/go-client/profiles/dev/client.yml b/examples/dubbo/go-client/profiles/dev/client.yml index 4e3acb0043d82cf74099ecbd2c33437478b6c8da..3fcbd2cb15cd4217a8900a148753b8a7337ac553 100644 --- a/examples/dubbo/go-client/profiles/dev/client.yml +++ b/examples/dubbo/go-client/profiles/dev/client.yml @@ -15,32 +15,32 @@ application_config: environment : "dev" registries : -- id: "hangzhouzk" - type: "zookeeper" - timeout : "3s" - address: "127.0.0.1:2181" - username: "" - password: "" + - id: "hangzhouzk" + type: "zookeeper" + timeout : "3s" + address: "127.0.0.1:2181" + username: "" + password: "" -- id: "shanghaizk" - type: "zookeeper" - timeout : "3s" - address: "127.0.0.1:2182" - username: "" - password: "" + - id: "shanghaizk" + type: "zookeeper" + timeout : "3s" + address: "127.0.0.1:2182" + username: "" + password: "" references: -- registries : - - "hangzhouzk" - - "shanghaizk" + - registries : + - "hangzhouzk" + - "shanghaizk" - protocol : "dubbo" -# url: "dubbo://127.0.0.1:20000" - interface : "com.ikurento.user.UserProvider" - cluster: "failover" - methods : - - name: "GetUser" - retries: 3 + protocol : "dubbo" + # url: "dubbo://127.0.0.1:20000" + interface : "com.ikurento.user.UserProvider" + cluster: "failover" + methods : + - name: "GetUser" + retries: 3 protocol_conf: dubbo: diff --git a/examples/dubbo/go-client/profiles/dev/log.yml b/examples/dubbo/go-client/profiles/dev/log.yml index 427308d52b028d1740dac56b66b2e54fa76c6fe2..59fa4279ad85272c4c49d532beaf23b74d00f58a 100644 --- a/examples/dubbo/go-client/profiles/dev/log.yml +++ b/examples/dubbo/go-client/profiles/dev/log.yml @@ -22,7 +22,7 @@ encoderConfig: nameEncoder: "" outputPaths: -- "stderr" + - "stderr" errorOutputPaths: -- "stderr" + - "stderr" initialFields: diff --git a/examples/dubbo/go-client/profiles/release/client.yml b/examples/dubbo/go-client/profiles/release/client.yml index cb36b6946c3d5c637e291c47e34a779aaf427553..998f232fcac87da0b793ca2c062cf6cf6de8f6f3 100644 --- a/examples/dubbo/go-client/profiles/release/client.yml +++ b/examples/dubbo/go-client/profiles/release/client.yml @@ -15,31 +15,31 @@ application_config: environment : "dev" registries : -- id: "hangzhouzk" - type: "zookeeper" - timeout : "3s" - address: "127.0.0.1:2181" - username: "" - password: "" + - id: "hangzhouzk" + type: "zookeeper" + timeout : "3s" + address: "127.0.0.1:2181" + username: "" + password: "" -- id: "shanghaizk" - type: "zookeeper" - timeout : "3s" - address: "127.0.0.1:2182" - username: "" - password: "" + - id: "shanghaizk" + type: "zookeeper" + timeout : "3s" + address: "127.0.0.1:2182" + username: "" + password: "" references: -- registries : - - "hangzhouzk" - - "shanghaizk" + - registries : + - "hangzhouzk" + - "shanghaizk" - protocol : "dubbo" - interface : "com.ikurento.user.UserProvider" - cluster: "failover" - methods : - - name: "GetUser" - retries: 3 + protocol : "dubbo" + interface : "com.ikurento.user.UserProvider" + cluster: "failover" + methods : + - name: "GetUser" + retries: 3 protocol_conf: dubbo: diff --git a/examples/dubbo/go-client/profiles/release/log.yml b/examples/dubbo/go-client/profiles/release/log.yml index b9139c2e9cb21d5f557eb53e5d6909fca64ac205..e0514be020eedf594d99d112183cdd5ce199e46d 100644 --- a/examples/dubbo/go-client/profiles/release/log.yml +++ b/examples/dubbo/go-client/profiles/release/log.yml @@ -22,7 +22,7 @@ encoderConfig: nameEncoder: "" outputPaths: -- "stderr" + - "stderr" errorOutputPaths: -- "stderr" + - "stderr" initialFields: diff --git a/examples/dubbo/go-client/profiles/test/client.yml b/examples/dubbo/go-client/profiles/test/client.yml index cb36b6946c3d5c637e291c47e34a779aaf427553..998f232fcac87da0b793ca2c062cf6cf6de8f6f3 100644 --- a/examples/dubbo/go-client/profiles/test/client.yml +++ b/examples/dubbo/go-client/profiles/test/client.yml @@ -15,31 +15,31 @@ application_config: environment : "dev" registries : -- id: "hangzhouzk" - type: "zookeeper" - timeout : "3s" - address: "127.0.0.1:2181" - username: "" - password: "" + - id: "hangzhouzk" + type: "zookeeper" + timeout : "3s" + address: "127.0.0.1:2181" + username: "" + password: "" -- id: "shanghaizk" - type: "zookeeper" - timeout : "3s" - address: "127.0.0.1:2182" - username: "" - password: "" + - id: "shanghaizk" + type: "zookeeper" + timeout : "3s" + address: "127.0.0.1:2182" + username: "" + password: "" references: -- registries : - - "hangzhouzk" - - "shanghaizk" + - registries : + - "hangzhouzk" + - "shanghaizk" - protocol : "dubbo" - interface : "com.ikurento.user.UserProvider" - cluster: "failover" - methods : - - name: "GetUser" - retries: 3 + protocol : "dubbo" + interface : "com.ikurento.user.UserProvider" + cluster: "failover" + methods : + - name: "GetUser" + retries: 3 protocol_conf: dubbo: diff --git a/examples/dubbo/go-client/profiles/test/log.yml b/examples/dubbo/go-client/profiles/test/log.yml index d2e1d05f3f46bc4ec6c7b8a16211c13d2189219d..baee0b7248484e425f88f35ab128212c931ff85e 100644 --- a/examples/dubbo/go-client/profiles/test/log.yml +++ b/examples/dubbo/go-client/profiles/test/log.yml @@ -22,7 +22,7 @@ encoderConfig: nameEncoder: "" outputPaths: -- "stderr" + - "stderr" errorOutputPaths: -- "stderr" + - "stderr" initialFields: diff --git a/examples/dubbo/go-server/app/server.go b/examples/dubbo/go-server/app/server.go index 1c0d2c2c7391a417177332ab7341d80ade7a4faf..db0196f63e2a43fcf06d73f15d925cf8af6f1867 100644 --- a/examples/dubbo/go-server/app/server.go +++ b/examples/dubbo/go-server/app/server.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang, Alex Stocks -// -// Licensed 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. +/* + * 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 main @@ -23,21 +26,21 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common/logger" - "github.com/dubbogo/hessian2" + "github.com/apache/dubbo-go/common/logger" + hessian "github.com/dubbogo/hessian2" ) import ( - "github.com/dubbo/go-for-apache-dubbo/config" - _ "github.com/dubbo/go-for-apache-dubbo/protocol/dubbo" - _ "github.com/dubbo/go-for-apache-dubbo/registry/protocol" + "github.com/apache/dubbo-go/config" + _ "github.com/apache/dubbo-go/protocol/dubbo" + _ "github.com/apache/dubbo-go/registry/protocol" - _ "github.com/dubbo/go-for-apache-dubbo/common/proxy/proxy_factory" - _ "github.com/dubbo/go-for-apache-dubbo/filter/impl" + _ "github.com/apache/dubbo-go/common/proxy/proxy_factory" + _ "github.com/apache/dubbo-go/filter/impl" - _ "github.com/dubbo/go-for-apache-dubbo/cluster/cluster_impl" - _ "github.com/dubbo/go-for-apache-dubbo/cluster/loadbalance" - _ "github.com/dubbo/go-for-apache-dubbo/registry/zookeeper" + _ "github.com/apache/dubbo-go/cluster/cluster_impl" + _ "github.com/apache/dubbo-go/cluster/loadbalance" + _ "github.com/apache/dubbo-go/registry/zookeeper" ) var ( diff --git a/examples/dubbo/go-server/app/user.go b/examples/dubbo/go-server/app/user.go index 87a4ccbcd3375f220bb041ba209df77b66ba66d1..c55b040eed5580ee842c20fb7ef5186b940aab82 100644 --- a/examples/dubbo/go-server/app/user.go +++ b/examples/dubbo/go-server/app/user.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang, Alex Stocks -// -// Licensed 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. +/* + * 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 main @@ -22,12 +25,12 @@ import ( ) import ( - "github.com/dubbogo/hessian2" perrors "github.com/pkg/errors" ) import ( - "github.com/dubbo/go-for-apache-dubbo/config" + "github.com/apache/dubbo-go/config" + hessian "github.com/dubbogo/hessian2" ) type Gender hessian.JavaEnum diff --git a/examples/dubbo/go-server/app/version.go b/examples/dubbo/go-server/app/version.go index c7552b26e11ec15fd51f3e18905d35d577647cd7..c6138584f1ddeab3a4927774f44f9e78a8f08da7 100644 --- a/examples/dubbo/go-server/app/version.go +++ b/examples/dubbo/go-server/app/version.go @@ -1,5 +1,22 @@ +/* + * 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 main var ( - Version string = "0.3.1" + Version = "2.6.0" ) diff --git a/examples/dubbo/go-server/assembly/common/build.sh b/examples/dubbo/go-server/assembly/common/build.sh index a41fbbac321b74849d71b28a65f8b7c5de13cf0f..15ac904f7c265d942d7018439719af7e7391aa41 100644 --- a/examples/dubbo/go-server/assembly/common/build.sh +++ b/examples/dubbo/go-server/assembly/common/build.sh @@ -15,7 +15,7 @@ PROJECT_HOME=`pwd` TARGET_FOLDER=${PROJECT_HOME}/target/${GOOS} TARGET_SBIN_NAME=${TARGET_EXEC_NAME} -version=`cat app/version.go | grep Version | awk -F '=' '{print $2}' | awk -F '"' '{print $2}'` +version=`cat app/version.go | grep Version | grep -v "Apache" | awk -F '=' '{print $2}' | awk -F '"' '{print $2}'` if [[ ${GOOS} == "windows" ]]; then TARGET_SBIN_NAME=${TARGET_SBIN_NAME}.exe fi diff --git a/examples/dubbo/go-server/profiles/dev/log.yml b/examples/dubbo/go-server/profiles/dev/log.yml index 427308d52b028d1740dac56b66b2e54fa76c6fe2..59fa4279ad85272c4c49d532beaf23b74d00f58a 100644 --- a/examples/dubbo/go-server/profiles/dev/log.yml +++ b/examples/dubbo/go-server/profiles/dev/log.yml @@ -22,7 +22,7 @@ encoderConfig: nameEncoder: "" outputPaths: -- "stderr" + - "stderr" errorOutputPaths: -- "stderr" + - "stderr" initialFields: diff --git a/examples/dubbo/go-server/profiles/dev/server.yml b/examples/dubbo/go-server/profiles/dev/server.yml index 7e10dc627ad218f0b61ce38b326d1c333ae45749..5f877efa879b17413df33b9330701707d00c2cfa 100644 --- a/examples/dubbo/go-server/profiles/dev/server.yml +++ b/examples/dubbo/go-server/profiles/dev/server.yml @@ -10,43 +10,52 @@ application_config: environment : "dev" registries : -- id: "hangzhouzk" - type: "zookeeper" - timeout : "3s" - address: "127.0.0.1:2181" - username: "" - password: "" + - id: "hangzhouzk" + type: "zookeeper" + timeout : "3s" + address: "127.0.0.1:2181" + username: "" + password: "" -- id: "shanghaizk" - type: "zookeeper" - timeout : "3s" - address: "127.0.0.1:2182" - username: "" - password: "" + - id: "shanghaizk" + type: "zookeeper" + timeout : "3s" + address: "127.0.0.1:2182" + username: "" + password: "" services: -- registries: - - "hangzhouzk" - - "shanghaizk" - protocol : "dubbo" - # 鐩稿綋浜巇ubbo.xml涓殑interface - interface : "com.ikurento.user.UserProvider" - loadbalance: "random" - warmup: "100" - cluster: "failover" - methods: - - name: "GetUser" - retries: 1 + - registries: + - "hangzhouzk" + - "shanghaizk" + protocol : "dubbo" + # 鐩稿綋浜巇ubbo.xml涓殑interface + interface : "com.ikurento.user.UserProvider" loadbalance: "random" + warmup: "100" + cluster: "failover" + methods: + - name: "GetUser" + retries: 1 + loadbalance: "random" protocols: +<<<<<<< HEAD - name: "dubbo" # ip : "127.0.0.1" port : 20000 #- name: "jsonrpc" # ip: "127.0.0.1" # port: 20001 +======= + - name: "dubbo" + ip : "127.0.0.1" + port : 20000 + #- name: "jsonrpc" + # ip: "127.0.0.1" + # port: 20001 +>>>>>>> upstream/master protocol_conf: dubbo: diff --git a/examples/dubbo/go-server/profiles/release/log.yml b/examples/dubbo/go-server/profiles/release/log.yml index b9139c2e9cb21d5f557eb53e5d6909fca64ac205..e0514be020eedf594d99d112183cdd5ce199e46d 100644 --- a/examples/dubbo/go-server/profiles/release/log.yml +++ b/examples/dubbo/go-server/profiles/release/log.yml @@ -22,7 +22,7 @@ encoderConfig: nameEncoder: "" outputPaths: -- "stderr" + - "stderr" errorOutputPaths: -- "stderr" + - "stderr" initialFields: diff --git a/examples/dubbo/go-server/profiles/release/server.yml b/examples/dubbo/go-server/profiles/release/server.yml index b46c3304fecb1ef2ae9586bf19c1070beb721e37..cecd8d4dd5619cb2c692122bd02e6b19dbe75603 100644 --- a/examples/dubbo/go-server/profiles/release/server.yml +++ b/examples/dubbo/go-server/profiles/release/server.yml @@ -10,43 +10,52 @@ application_config: environment : "dev" registries : -- id: "hangzhouzk" - type: "zookeeper" - timeout : "3s" - address: "127.0.0.1:2181" - username: "" - password: "" + - id: "hangzhouzk" + type: "zookeeper" + timeout : "3s" + address: "127.0.0.1:2181" + username: "" + password: "" -- id: "shanghaizk" - type: "zookeeper" - timeout : "3s" - address: "127.0.0.1:2182" - username: "" - password: "" + - id: "shanghaizk" + type: "zookeeper" + timeout : "3s" + address: "127.0.0.1:2182" + username: "" + password: "" services: -- registries: - - "hangzhouzk" - - "shanghaizk" - protocol : "dubbo" - # 鐩稿綋浜巇ubbo.xml涓殑interface - interface : "com.ikurento.user.UserProvider" - loadbalance: "random" - warmup: "100" - cluster: "failover" - methods: - - name: "GetUser" - retries: 1 + - registries: + - "hangzhouzk" + - "shanghaizk" + protocol : "dubbo" + # 鐩稿綋浜巇ubbo.xml涓殑interface + interface : "com.ikurento.user.UserProvider" loadbalance: "random" + warmup: "100" + cluster: "failover" + methods: + - name: "GetUser" + retries: 1 + loadbalance: "random" protocols: +<<<<<<< HEAD - name: "dubbo" # ip : "127.0.0.1" port : 20000 #- name: "jsonrpc" # ip: "127.0.0.1" # port: 20001 +======= + - name: "dubbo" + ip : "127.0.0.1" + port : 20000 + #- name: "jsonrpc" + # ip: "127.0.0.1" + # port: 20001 +>>>>>>> upstream/master protocol_conf: dubbo: diff --git a/examples/dubbo/go-server/profiles/test/log.yml b/examples/dubbo/go-server/profiles/test/log.yml index d2e1d05f3f46bc4ec6c7b8a16211c13d2189219d..baee0b7248484e425f88f35ab128212c931ff85e 100644 --- a/examples/dubbo/go-server/profiles/test/log.yml +++ b/examples/dubbo/go-server/profiles/test/log.yml @@ -22,7 +22,7 @@ encoderConfig: nameEncoder: "" outputPaths: -- "stderr" + - "stderr" errorOutputPaths: -- "stderr" + - "stderr" initialFields: diff --git a/examples/dubbo/go-server/profiles/test/server.yml b/examples/dubbo/go-server/profiles/test/server.yml index b46c3304fecb1ef2ae9586bf19c1070beb721e37..cecd8d4dd5619cb2c692122bd02e6b19dbe75603 100644 --- a/examples/dubbo/go-server/profiles/test/server.yml +++ b/examples/dubbo/go-server/profiles/test/server.yml @@ -10,43 +10,52 @@ application_config: environment : "dev" registries : -- id: "hangzhouzk" - type: "zookeeper" - timeout : "3s" - address: "127.0.0.1:2181" - username: "" - password: "" + - id: "hangzhouzk" + type: "zookeeper" + timeout : "3s" + address: "127.0.0.1:2181" + username: "" + password: "" -- id: "shanghaizk" - type: "zookeeper" - timeout : "3s" - address: "127.0.0.1:2182" - username: "" - password: "" + - id: "shanghaizk" + type: "zookeeper" + timeout : "3s" + address: "127.0.0.1:2182" + username: "" + password: "" services: -- registries: - - "hangzhouzk" - - "shanghaizk" - protocol : "dubbo" - # 鐩稿綋浜巇ubbo.xml涓殑interface - interface : "com.ikurento.user.UserProvider" - loadbalance: "random" - warmup: "100" - cluster: "failover" - methods: - - name: "GetUser" - retries: 1 + - registries: + - "hangzhouzk" + - "shanghaizk" + protocol : "dubbo" + # 鐩稿綋浜巇ubbo.xml涓殑interface + interface : "com.ikurento.user.UserProvider" loadbalance: "random" + warmup: "100" + cluster: "failover" + methods: + - name: "GetUser" + retries: 1 + loadbalance: "random" protocols: +<<<<<<< HEAD - name: "dubbo" # ip : "127.0.0.1" port : 20000 #- name: "jsonrpc" # ip: "127.0.0.1" # port: 20001 +======= + - name: "dubbo" + ip : "127.0.0.1" + port : 20000 + #- name: "jsonrpc" + # ip: "127.0.0.1" + # port: 20001 +>>>>>>> upstream/master protocol_conf: dubbo: diff --git a/examples/jsonrpc/go-client/app/client.go b/examples/jsonrpc/go-client/app/client.go index 3793468ce64c0f98e7f5125c4e17b318435985fe..30a4ed1692d650a2580c008dde6f834e2c29b81e 100644 --- a/examples/jsonrpc/go-client/app/client.go +++ b/examples/jsonrpc/go-client/app/client.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang, Alex Stocks -// -// Licensed 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. +/* + * 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 main @@ -24,17 +27,17 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common/logger" - _ "github.com/dubbo/go-for-apache-dubbo/common/proxy/proxy_factory" - "github.com/dubbo/go-for-apache-dubbo/config" - _ "github.com/dubbo/go-for-apache-dubbo/protocol/jsonrpc" - _ "github.com/dubbo/go-for-apache-dubbo/registry/protocol" + "github.com/apache/dubbo-go/common/logger" + _ "github.com/apache/dubbo-go/common/proxy/proxy_factory" + "github.com/apache/dubbo-go/config" + _ "github.com/apache/dubbo-go/protocol/jsonrpc" + _ "github.com/apache/dubbo-go/registry/protocol" - _ "github.com/dubbo/go-for-apache-dubbo/filter/impl" + _ "github.com/apache/dubbo-go/filter/impl" - _ "github.com/dubbo/go-for-apache-dubbo/cluster/cluster_impl" - _ "github.com/dubbo/go-for-apache-dubbo/cluster/loadbalance" - _ "github.com/dubbo/go-for-apache-dubbo/registry/zookeeper" + _ "github.com/apache/dubbo-go/cluster/cluster_impl" + _ "github.com/apache/dubbo-go/cluster/loadbalance" + _ "github.com/apache/dubbo-go/registry/zookeeper" ) var ( diff --git a/examples/jsonrpc/go-client/app/user.go b/examples/jsonrpc/go-client/app/user.go index 0d159876125a19bb9c75fbd21d893942763a67c8..6e2a97081ce74b28424e9faa8a74194cf9ea141f 100644 --- a/examples/jsonrpc/go-client/app/user.go +++ b/examples/jsonrpc/go-client/app/user.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang, Alex Stocks -// -// Licensed 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. +/* + * 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 main @@ -21,7 +24,7 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/config" + "github.com/apache/dubbo-go/config" ) func init() { diff --git a/examples/jsonrpc/go-client/app/version.go b/examples/jsonrpc/go-client/app/version.go index 33bb9cd02dd53fdbd84f9f96942cf2dc9c1ef115..c6138584f1ddeab3a4927774f44f9e78a8f08da7 100644 --- a/examples/jsonrpc/go-client/app/version.go +++ b/examples/jsonrpc/go-client/app/version.go @@ -1,5 +1,22 @@ +/* + * 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 main var ( - Version = "0.3.1" + Version = "2.6.0" ) diff --git a/examples/jsonrpc/go-client/assembly/common/build.sh b/examples/jsonrpc/go-client/assembly/common/build.sh index 00763725b821e54dd0f378b0ec60757837067ef9..06b212db6c3dcc28e5e43666284662bcb7abcae4 100644 --- a/examples/jsonrpc/go-client/assembly/common/build.sh +++ b/examples/jsonrpc/go-client/assembly/common/build.sh @@ -15,7 +15,7 @@ PROJECT_HOME=`pwd` TARGET_FOLDER=${PROJECT_HOME}/target/${GOOS} TARGET_SBIN_NAME=${TARGET_EXEC_NAME} -version=`cat app/version.go | grep Version | awk -F '=' '{print $2}' | awk -F '"' '{print $2}'` +version=`cat app/version.go | grep Version | grep -v "Apache" | awk -F '=' '{print $2}' | awk -F '"' '{print $2}'` if [[ ${GOOS} == "windows" ]]; then TARGET_SBIN_NAME=${TARGET_SBIN_NAME}.exe fi diff --git a/examples/jsonrpc/go-client/profiles/dev/client.yml b/examples/jsonrpc/go-client/profiles/dev/client.yml index 50ed8d5011cbbd08b133f040eb0d71edb970f146..020adc5e6bd1294a8174f5c0e663f379fe03c88e 100644 --- a/examples/jsonrpc/go-client/profiles/dev/client.yml +++ b/examples/jsonrpc/go-client/profiles/dev/client.yml @@ -16,28 +16,52 @@ application_config: environment : "dev" registries : -- id: "hangzhouzk" - type: "zookeeper" - timeout : "3s" - address: "127.0.0.1:2181" - username: "" - password: "" + - id: "hangzhouzk" + type: "zookeeper" + timeout : "3s" + address: "127.0.0.1:2181" + username: "" + password: "" -- id: "shanghaizk" - type: "zookeeper" - timeout : "3s" - address: "127.0.0.1:2182" - username: "" - password: "" + - id: "shanghaizk" + type: "zookeeper" + timeout : "3s" + address: "127.0.0.1:2182" + username: "" + password: "" references: -- registries : - - "hangzhouzk" - - "shanghaizk" + - registries : + - "hangzhouzk" + - "shanghaizk" - protocol : "jsonrpc" - interface : "com.ikurento.user.UserProvider" - cluster: "failover" - methods : - - name: "GetUser" - retries: 3 + protocol : "jsonrpc" + interface : "com.ikurento.user.UserProvider" + cluster: "failover" + methods : + - name: "GetUser" + retries: 3 + +protocol_conf: + dubbo: + reconnect_interval: 0 + connection_number: 2 + heartbeat_period: "5s" + session_timeout: "20s" + fail_fast_timeout: "5s" + pool_size: 64 + pool_ttl: 600 + getty_session_param: + compress_encoding: false + tcp_no_delay: true + tcp_keep_alive: true + keep_alive_period: "120s" + tcp_r_buf_size: 262144 + tcp_w_buf_size: 65536 + pkg_rq_size: 1024 + pkg_wq_size: 512 + tcp_read_timeout: "1s" + tcp_write_timeout: "5s" + wait_timeout: "1s" + max_msg_len: 10240 + session_name: "client" diff --git a/examples/jsonrpc/go-client/profiles/dev/log.yml b/examples/jsonrpc/go-client/profiles/dev/log.yml index 427308d52b028d1740dac56b66b2e54fa76c6fe2..59fa4279ad85272c4c49d532beaf23b74d00f58a 100644 --- a/examples/jsonrpc/go-client/profiles/dev/log.yml +++ b/examples/jsonrpc/go-client/profiles/dev/log.yml @@ -22,7 +22,7 @@ encoderConfig: nameEncoder: "" outputPaths: -- "stderr" + - "stderr" errorOutputPaths: -- "stderr" + - "stderr" initialFields: diff --git a/examples/jsonrpc/go-client/profiles/release/client.yml b/examples/jsonrpc/go-client/profiles/release/client.yml index 5aae8b717dc448162e0495e4b24d079f43351f4d..3e3bd63f5b2a73312936fc6dbc07404bcbe11687 100644 --- a/examples/jsonrpc/go-client/profiles/release/client.yml +++ b/examples/jsonrpc/go-client/profiles/release/client.yml @@ -17,28 +17,28 @@ application_config: environment : "dev" registries : -- id: "hangzhouzk" - type: "zookeeper" - timeout : "3s" - address: "127.0.0.1:2181" - username: "" - password: "" + - id: "hangzhouzk" + type: "zookeeper" + timeout : "3s" + address: "127.0.0.1:2181" + username: "" + password: "" -- id: "shanghaizk" - type: "zookeeper" - timeout : "3s" - address: "127.0.0.1:2182" - username: "" - password: "" + - id: "shanghaizk" + type: "zookeeper" + timeout : "3s" + address: "127.0.0.1:2182" + username: "" + password: "" references: -- registries : - - "hangzhouzk" - - "shanghaizk" + - registries : + - "hangzhouzk" + - "shanghaizk" - protocol : "jsonrpc" - interface : "com.ikurento.user.UserProvider" - cluster: "failover" - methods : - - name: "GetUser" - retries: 3 + protocol : "jsonrpc" + interface : "com.ikurento.user.UserProvider" + cluster: "failover" + methods : + - name: "GetUser" + retries: 3 diff --git a/examples/jsonrpc/go-client/profiles/release/log.yml b/examples/jsonrpc/go-client/profiles/release/log.yml index b9139c2e9cb21d5f557eb53e5d6909fca64ac205..e0514be020eedf594d99d112183cdd5ce199e46d 100644 --- a/examples/jsonrpc/go-client/profiles/release/log.yml +++ b/examples/jsonrpc/go-client/profiles/release/log.yml @@ -22,7 +22,7 @@ encoderConfig: nameEncoder: "" outputPaths: -- "stderr" + - "stderr" errorOutputPaths: -- "stderr" + - "stderr" initialFields: diff --git a/examples/jsonrpc/go-client/profiles/test/client.yml b/examples/jsonrpc/go-client/profiles/test/client.yml index 5e0c0cea0a37672e9e24f5b0f9a7faeca9754f2a..e79f7f47f72f598775be0c226b2f63a3d334f8fe 100644 --- a/examples/jsonrpc/go-client/profiles/test/client.yml +++ b/examples/jsonrpc/go-client/profiles/test/client.yml @@ -16,28 +16,28 @@ application_config: environment : "dev" registries : -- id: "hangzhouzk" - type: "zookeeper" - timeout : "3s" - address: "127.0.0.1:2181" - username: "" - password: "" + - id: "hangzhouzk" + type: "zookeeper" + timeout : "3s" + address: "127.0.0.1:2181" + username: "" + password: "" -- id: "shanghaizk" - type: "zookeeper" - timeout : "3s" - address: "127.0.0.1:2182" - username: "" - password: "" + - id: "shanghaizk" + type: "zookeeper" + timeout : "3s" + address: "127.0.0.1:2182" + username: "" + password: "" references: -- registries : - - "hangzhouzk" - - "shanghaizk" + - registries : + - "hangzhouzk" + - "shanghaizk" - protocol : "jsonrpc" - interface : "com.ikurento.user.UserProvider" - cluster: "failover" - methods : - - name: "GetUser" - retries: 3 + protocol : "jsonrpc" + interface : "com.ikurento.user.UserProvider" + cluster: "failover" + methods : + - name: "GetUser" + retries: 3 diff --git a/examples/jsonrpc/go-client/profiles/test/log.yml b/examples/jsonrpc/go-client/profiles/test/log.yml index d2e1d05f3f46bc4ec6c7b8a16211c13d2189219d..baee0b7248484e425f88f35ab128212c931ff85e 100644 --- a/examples/jsonrpc/go-client/profiles/test/log.yml +++ b/examples/jsonrpc/go-client/profiles/test/log.yml @@ -22,7 +22,7 @@ encoderConfig: nameEncoder: "" outputPaths: -- "stderr" + - "stderr" errorOutputPaths: -- "stderr" + - "stderr" initialFields: diff --git a/examples/jsonrpc/go-server/app/server.go b/examples/jsonrpc/go-server/app/server.go index 90c78413c45b54aa883868b140290f22802ebd15..45692b4d1259ef0a8a8c4d784575488184289658 100644 --- a/examples/jsonrpc/go-server/app/server.go +++ b/examples/jsonrpc/go-server/app/server.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang, Alex Stocks -// -// Licensed 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. +/* + * 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 main @@ -23,17 +26,17 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common/logger" - _ "github.com/dubbo/go-for-apache-dubbo/common/proxy/proxy_factory" - "github.com/dubbo/go-for-apache-dubbo/config" - _ "github.com/dubbo/go-for-apache-dubbo/protocol/jsonrpc" - _ "github.com/dubbo/go-for-apache-dubbo/registry/protocol" + "github.com/apache/dubbo-go/common/logger" + _ "github.com/apache/dubbo-go/common/proxy/proxy_factory" + "github.com/apache/dubbo-go/config" + _ "github.com/apache/dubbo-go/protocol/jsonrpc" + _ "github.com/apache/dubbo-go/registry/protocol" - _ "github.com/dubbo/go-for-apache-dubbo/filter/impl" + _ "github.com/apache/dubbo-go/filter/impl" - _ "github.com/dubbo/go-for-apache-dubbo/cluster/cluster_impl" - _ "github.com/dubbo/go-for-apache-dubbo/cluster/loadbalance" - _ "github.com/dubbo/go-for-apache-dubbo/registry/zookeeper" + _ "github.com/apache/dubbo-go/cluster/cluster_impl" + _ "github.com/apache/dubbo-go/cluster/loadbalance" + _ "github.com/apache/dubbo-go/registry/zookeeper" ) var ( diff --git a/examples/jsonrpc/go-server/app/user.go b/examples/jsonrpc/go-server/app/user.go index 9170de431a719351ee1e1af4e5c6bbcd4cbfde62..fbe6f3339c212d2bd42d52b6bbf7c7fcec6fb9c3 100644 --- a/examples/jsonrpc/go-server/app/user.go +++ b/examples/jsonrpc/go-server/app/user.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang, Alex Stocks -// -// Licensed 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. +/* + * 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 main @@ -25,7 +28,7 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/config" + "github.com/apache/dubbo-go/config" ) type Gender int diff --git a/examples/jsonrpc/go-server/app/version.go b/examples/jsonrpc/go-server/app/version.go index c7552b26e11ec15fd51f3e18905d35d577647cd7..c6138584f1ddeab3a4927774f44f9e78a8f08da7 100644 --- a/examples/jsonrpc/go-server/app/version.go +++ b/examples/jsonrpc/go-server/app/version.go @@ -1,5 +1,22 @@ +/* + * 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 main var ( - Version string = "0.3.1" + Version = "2.6.0" ) diff --git a/examples/jsonrpc/go-server/assembly/common/build.sh b/examples/jsonrpc/go-server/assembly/common/build.sh index a41fbbac321b74849d71b28a65f8b7c5de13cf0f..15ac904f7c265d942d7018439719af7e7391aa41 100644 --- a/examples/jsonrpc/go-server/assembly/common/build.sh +++ b/examples/jsonrpc/go-server/assembly/common/build.sh @@ -15,7 +15,7 @@ PROJECT_HOME=`pwd` TARGET_FOLDER=${PROJECT_HOME}/target/${GOOS} TARGET_SBIN_NAME=${TARGET_EXEC_NAME} -version=`cat app/version.go | grep Version | awk -F '=' '{print $2}' | awk -F '"' '{print $2}'` +version=`cat app/version.go | grep Version | grep -v "Apache" | awk -F '=' '{print $2}' | awk -F '"' '{print $2}'` if [[ ${GOOS} == "windows" ]]; then TARGET_SBIN_NAME=${TARGET_SBIN_NAME}.exe fi diff --git a/examples/jsonrpc/go-server/profiles/dev/log.yml b/examples/jsonrpc/go-server/profiles/dev/log.yml index 427308d52b028d1740dac56b66b2e54fa76c6fe2..59fa4279ad85272c4c49d532beaf23b74d00f58a 100644 --- a/examples/jsonrpc/go-server/profiles/dev/log.yml +++ b/examples/jsonrpc/go-server/profiles/dev/log.yml @@ -22,7 +22,7 @@ encoderConfig: nameEncoder: "" outputPaths: -- "stderr" + - "stderr" errorOutputPaths: -- "stderr" + - "stderr" initialFields: diff --git a/examples/jsonrpc/go-server/profiles/dev/server.yml b/examples/jsonrpc/go-server/profiles/dev/server.yml index 945df75c1018280d70c9e78f48d86bc3dc3453ae..0175847a68c19427a35d000f6a7e6d215fd8cf64 100644 --- a/examples/jsonrpc/go-server/profiles/dev/server.yml +++ b/examples/jsonrpc/go-server/profiles/dev/server.yml @@ -10,41 +10,41 @@ application_config: environment : "dev" registries : -- id: "hangzhouzk" - type: "zookeeper" - timeout : "3s" - address: "127.0.0.1:2181" - username: "" - password: "" + - id: "hangzhouzk" + type: "zookeeper" + timeout : "3s" + address: "127.0.0.1:2181" + username: "" + password: "" -- id: "shanghaizk" - type: "zookeeper" - timeout : "3s" - address: "127.0.0.1:2182" - username: "" - password: "" + - id: "shanghaizk" + type: "zookeeper" + timeout : "3s" + address: "127.0.0.1:2182" + username: "" + password: "" services: -- registries: - - "hangzhouzk" - - "shanghaizk" - protocol : "jsonrpc" - # 鐩稿綋浜巇ubbo.xml涓殑interface - interface : "com.ikurento.user.UserProvider" - loadbalance: "random" - warmup: "100" - cluster: "failover" - methods: - - name: "GetUser" - retries: 1 - loadbalance: "random" + - registries: + - "hangzhouzk" + - "shanghaizk" + protocol : "jsonrpc" + # 鐩稿綋浜巇ubbo.xml涓殑interface + interface : "com.ikurento.user.UserProvider" + loadbalance: "random" + warmup: "100" + cluster: "failover" + methods: + - name: "GetUser" + retries: 1 + loadbalance: "random" protocols: -#- name: "dubbo" -# ip : "127.0.0.1" -# port : 20000 -- name: "jsonrpc" - ip: "127.0.0.1" - port: 20001 + #- name: "dubbo" + # ip : "127.0.0.1" + # port : 20000 + - name: "jsonrpc" + ip: "127.0.0.1" + port: 20001 diff --git a/examples/jsonrpc/go-server/profiles/release/log.yml b/examples/jsonrpc/go-server/profiles/release/log.yml index b9139c2e9cb21d5f557eb53e5d6909fca64ac205..e0514be020eedf594d99d112183cdd5ce199e46d 100644 --- a/examples/jsonrpc/go-server/profiles/release/log.yml +++ b/examples/jsonrpc/go-server/profiles/release/log.yml @@ -22,7 +22,7 @@ encoderConfig: nameEncoder: "" outputPaths: -- "stderr" + - "stderr" errorOutputPaths: -- "stderr" + - "stderr" initialFields: diff --git a/examples/jsonrpc/go-server/profiles/release/server.yml b/examples/jsonrpc/go-server/profiles/release/server.yml index 597c493d932a63497d265ac37d2d0715751d1005..3c70e82483be227d60e7e9806ed19d3f371ded11 100644 --- a/examples/jsonrpc/go-server/profiles/release/server.yml +++ b/examples/jsonrpc/go-server/profiles/release/server.yml @@ -26,25 +26,25 @@ registries : services: -- registries: - - "hangzhouzk" - - "shanghaizk" - protocol : "jsonrpc" - # 鐩稿綋浜巇ubbo.xml涓殑interface - interface : "com.ikurento.user.UserProvider" - loadbalance: "random" - warmup: "100" - cluster: "failover" - methods: - - name: "GetUser" - retries: 1 + - registries: + - "hangzhouzk" + - "shanghaizk" + protocol : "jsonrpc" + # 鐩稿綋浜巇ubbo.xml涓殑interface + interface : "com.ikurento.user.UserProvider" loadbalance: "random" + warmup: "100" + cluster: "failover" + methods: + - name: "GetUser" + retries: 1 + loadbalance: "random" protocols: -#- name: "dubbo" -# ip : "127.0.0.1" -# port : 20000 -- name: "jsonrpc" - ip: "127.0.0.1" - port: 20001 + #- name: "dubbo" + # ip : "127.0.0.1" + # port : 20000 + - name: "jsonrpc" + ip: "127.0.0.1" + port: 20001 diff --git a/examples/jsonrpc/go-server/profiles/test/log.yml b/examples/jsonrpc/go-server/profiles/test/log.yml index d2e1d05f3f46bc4ec6c7b8a16211c13d2189219d..baee0b7248484e425f88f35ab128212c931ff85e 100644 --- a/examples/jsonrpc/go-server/profiles/test/log.yml +++ b/examples/jsonrpc/go-server/profiles/test/log.yml @@ -22,7 +22,7 @@ encoderConfig: nameEncoder: "" outputPaths: -- "stderr" + - "stderr" errorOutputPaths: -- "stderr" + - "stderr" initialFields: diff --git a/examples/jsonrpc/go-server/profiles/test/server.yml b/examples/jsonrpc/go-server/profiles/test/server.yml index 597c493d932a63497d265ac37d2d0715751d1005..a8ad5746b35804cc0154830fa2d59be249bbc46b 100644 --- a/examples/jsonrpc/go-server/profiles/test/server.yml +++ b/examples/jsonrpc/go-server/profiles/test/server.yml @@ -10,41 +10,39 @@ application_config: environment : "dev" registries : -- id: "hangzhouzk" - type: "zookeeper" - timeout : "3s" - address: "127.0.0.1:2181" - username: "" - password: "" - -- id: "shanghaizk" - type: "zookeeper" - timeout : "3s" - address: "127.0.0.1:2182" - username: "" - password: "" + - id: "hangzhouzk" + type: "zookeeper" + timeout : "3s" + address: "127.0.0.1:2181" + username: "" + password: "" + - id: "shanghaizk" + type: "zookeeper" + timeout : "3s" + address: "127.0.0.1:2182" + username: "" + password: "" services: -- registries: - - "hangzhouzk" - - "shanghaizk" - protocol : "jsonrpc" - # 鐩稿綋浜巇ubbo.xml涓殑interface - interface : "com.ikurento.user.UserProvider" - loadbalance: "random" - warmup: "100" - cluster: "failover" - methods: - - name: "GetUser" - retries: 1 + - registries: + - "hangzhouzk" + - "shanghaizk" + protocol : "jsonrpc" + # 鐩稿綋浜巇ubbo.xml涓殑interface + interface : "com.ikurento.user.UserProvider" loadbalance: "random" + warmup: "100" + cluster: "failover" + methods: + - name: "GetUser" + retries: 1 + loadbalance: "random" protocols: -#- name: "dubbo" -# ip : "127.0.0.1" -# port : 20000 -- name: "jsonrpc" - ip: "127.0.0.1" - port: 20001 - + #- name: "dubbo" + # ip : "127.0.0.1" + # port : 20000 + - name: "jsonrpc" + ip: "127.0.0.1" + port: 20001 diff --git a/filter/filter.go b/filter/filter.go index 384dbf1a5771ed5ddac2b4863d317616421d45f9..5bd78998a76a1b0e8af99b0b3f0d7e6c103bb794 100644 --- a/filter/filter.go +++ b/filter/filter.go @@ -1,21 +1,24 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 filter import ( - "github.com/dubbo/go-for-apache-dubbo/protocol" + "github.com/apache/dubbo-go/protocol" ) // Extension - Filter diff --git a/filter/impl/echo_filter.go b/filter/impl/echo_filter.go index 0eb2e0d0f79cf355d2efc08055f1d9cc683376dd..5eb5a37fa500bd8c180d879240d1c1e367df31ce 100644 --- a/filter/impl/echo_filter.go +++ b/filter/impl/echo_filter.go @@ -1,28 +1,33 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 impl import ( - "github.com/dubbo/go-for-apache-dubbo/common/constant" - "github.com/dubbo/go-for-apache-dubbo/common/extension" - "github.com/dubbo/go-for-apache-dubbo/common/logger" - "github.com/dubbo/go-for-apache-dubbo/filter" - "github.com/dubbo/go-for-apache-dubbo/protocol" + "github.com/apache/dubbo-go/common/constant" + "github.com/apache/dubbo-go/common/extension" + "github.com/apache/dubbo-go/common/logger" + "github.com/apache/dubbo-go/filter" + "github.com/apache/dubbo-go/protocol" ) -const ECHO = "echo" +const ( + ECHO = "echo" +) func init() { extension.SetFilter(ECHO, GetFilter) @@ -31,8 +36,7 @@ func init() { // RPCService need a Echo method in consumer, if you want to use EchoFilter // eg: // Echo func(ctx context.Context, arg interface{}, rsp *Xxx) error -type EchoFilter struct { -} +type EchoFilter struct{} func (ef *EchoFilter) Invoke(invoker protocol.Invoker, invocation protocol.Invocation) protocol.Result { logger.Infof("invoking echo filter.") @@ -42,6 +46,7 @@ func (ef *EchoFilter) Invoke(invoker protocol.Invoker, invocation protocol.Invoc Rest: invocation.Arguments()[0], } } + return invoker.Invoke(invocation) } diff --git a/filter/impl/echo_filter_test.go b/filter/impl/echo_filter_test.go index f8774edb8960df9f26e1b41608f408618f4cc343..e2752c85b24b5dbc8175cbd125ed771b412d1818 100644 --- a/filter/impl/echo_filter_test.go +++ b/filter/impl/echo_filter_test.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 impl @@ -23,9 +26,9 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/protocol" - "github.com/dubbo/go-for-apache-dubbo/protocol/invocation" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/protocol" + "github.com/apache/dubbo-go/protocol/invocation" ) func TestEchoFilter_Invoke(t *testing.T) { diff --git a/go.mod b/go.mod index ec78eaf90c88503a0af6a3510e2564d503be9555..66757f22f3d92c7c6c4ef8287756f7a1cd959ed0 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/dubbo/go-for-apache-dubbo +module github.com/apache/dubbo-go require ( github.com/dubbogo/getty v0.0.0-20190523180329-bdf5e640ea53 diff --git a/protocol/dubbo/client.go b/protocol/dubbo/client.go index ff094eb5aaa1af8d2ffa6a6c210574303e9052f2..d055ddac9abc2d046e6c10dc40ecbae23af35e27 100644 --- a/protocol/dubbo/client.go +++ b/protocol/dubbo/client.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang, Alex Stocks -// -// Licensed 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. +/* + * 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 dubbo @@ -22,17 +25,17 @@ import ( import ( "github.com/dubbogo/getty" - "github.com/dubbogo/hessian2" + hessian "github.com/dubbogo/hessian2" perrors "github.com/pkg/errors" "go.uber.org/atomic" "gopkg.in/yaml.v2" ) import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/constant" - "github.com/dubbo/go-for-apache-dubbo/common/logger" - "github.com/dubbo/go-for-apache-dubbo/config" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/constant" + "github.com/apache/dubbo-go/common/logger" + "github.com/apache/dubbo-go/config" ) var ( diff --git a/protocol/dubbo/client_test.go b/protocol/dubbo/client_test.go index fe18e4de4d40f41cc7bf0ad1eddca0904e781e6c..0a02739a86d9ed6bffc0b209152ac789faee87f3 100644 --- a/protocol/dubbo/client_test.go +++ b/protocol/dubbo/client_test.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 dubbo @@ -28,8 +31,8 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/protocol" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/protocol" ) type ( diff --git a/protocol/dubbo/codec.go b/protocol/dubbo/codec.go index ba4d01ab0fbe49745cfd23646596cebaa2ae619e..a20fcfabd1ca93b6ad5073d3ff56a51a3a16bbe7 100644 --- a/protocol/dubbo/codec.go +++ b/protocol/dubbo/codec.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang, Alex Stocks -// -// Licensed 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. +/* + * 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 dubbo @@ -22,7 +25,7 @@ import ( ) import ( - "github.com/dubbogo/hessian2" + hessian "github.com/dubbogo/hessian2" perrors "github.com/pkg/errors" ) diff --git a/protocol/dubbo/codec_test.go b/protocol/dubbo/codec_test.go index 7ae227379afb79056b70564d1f3204d0606b1625..f585666b3769d1384681039d25cea98a36a589fc 100644 --- a/protocol/dubbo/codec_test.go +++ b/protocol/dubbo/codec_test.go @@ -1,27 +1,29 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 dubbo import ( "testing" "time" -) -import ( - "github.com/dubbogo/hessian2" "github.com/stretchr/testify/assert" + + hessian "github.com/dubbogo/hessian2" ) func TestDubboPackage_MarshalAndUnmarshal(t *testing.T) { diff --git a/protocol/dubbo/config.go b/protocol/dubbo/config.go index fa47118db82f5418d4d5f6703e212d82efebe83a..0af1a4a41116fca06d6793fddaf7f69ade2f30c0 100644 --- a/protocol/dubbo/config.go +++ b/protocol/dubbo/config.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Alex Stocks -// -// Licensed 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. +/* + * 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 dubbo diff --git a/protocol/dubbo/dubbo_exporter.go b/protocol/dubbo/dubbo_exporter.go index d76ee812f1f21a29d391e404b2d68517f40bd4bc..bdec8a349f358f265fe064ed2083433f27d40a3b 100644 --- a/protocol/dubbo/dubbo_exporter.go +++ b/protocol/dubbo/dubbo_exporter.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 dubbo @@ -19,10 +22,10 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/constant" - "github.com/dubbo/go-for-apache-dubbo/common/logger" - "github.com/dubbo/go-for-apache-dubbo/protocol" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/constant" + "github.com/apache/dubbo-go/common/logger" + "github.com/apache/dubbo-go/protocol" ) type DubboExporter struct { diff --git a/protocol/dubbo/dubbo_invoker.go b/protocol/dubbo/dubbo_invoker.go index 690e4d9b9a476eb832adcedd41f7ddb5ba52939f..46b3dcc8463d8406c494d80149b28f0dba7444d0 100644 --- a/protocol/dubbo/dubbo_invoker.go +++ b/protocol/dubbo/dubbo_invoker.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 dubbo @@ -24,11 +27,11 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/constant" - "github.com/dubbo/go-for-apache-dubbo/common/logger" - "github.com/dubbo/go-for-apache-dubbo/protocol" - invocation_impl "github.com/dubbo/go-for-apache-dubbo/protocol/invocation" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/constant" + "github.com/apache/dubbo-go/common/logger" + "github.com/apache/dubbo-go/protocol" + invocation_impl "github.com/apache/dubbo-go/protocol/invocation" ) var Err_No_Reply = perrors.New("request need @reply") diff --git a/protocol/dubbo/dubbo_invoker_test.go b/protocol/dubbo/dubbo_invoker_test.go index 3931279ef5dff9a9ffd450a114a63dbcab223611..4368bb4630900eb2c4eece760b3b3e5c4887c478 100644 --- a/protocol/dubbo/dubbo_invoker_test.go +++ b/protocol/dubbo/dubbo_invoker_test.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 dubbo @@ -25,8 +28,8 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common/constant" - "github.com/dubbo/go-for-apache-dubbo/protocol/invocation" + "github.com/apache/dubbo-go/common/constant" + "github.com/apache/dubbo-go/protocol/invocation" ) func TestDubboInvoker_Invoke(t *testing.T) { diff --git a/protocol/dubbo/dubbo_protocol.go b/protocol/dubbo/dubbo_protocol.go index 512ca099dd8138261e7b50e5cfc07abec273e2d3..269a38cf6f9e5891bf622aa6a63820ebc5989194 100644 --- a/protocol/dubbo/dubbo_protocol.go +++ b/protocol/dubbo/dubbo_protocol.go @@ -1,33 +1,40 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 dubbo import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/extension" - "github.com/dubbo/go-for-apache-dubbo/common/logger" - "github.com/dubbo/go-for-apache-dubbo/protocol" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/extension" + "github.com/apache/dubbo-go/common/logger" + "github.com/apache/dubbo-go/protocol" ) -const DUBBO = "dubbo" +const ( + DUBBO = "dubbo" +) func init() { extension.SetProtocol(DUBBO, GetProtocol) } -var dubboProtocol *DubboProtocol +var ( + dubboProtocol *DubboProtocol +) type DubboProtocol struct { protocol.BaseProtocol diff --git a/protocol/dubbo/dubbo_protocol_test.go b/protocol/dubbo/dubbo_protocol_test.go index 9c89667923214248e940b3f98a602a8d4a3e66af..0c4bfdcc7a7089873b66f278028f2e4358b013d3 100644 --- a/protocol/dubbo/dubbo_protocol_test.go +++ b/protocol/dubbo/dubbo_protocol_test.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 dubbo @@ -24,8 +27,8 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/protocol" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/protocol" ) func TestDubboProtocol_Export(t *testing.T) { diff --git a/protocol/dubbo/listener.go b/protocol/dubbo/listener.go index 9cb4ee69aed2abfcbbd8d1467a923d8e431f920a..84be5818825f1abf1d92c21473733a5e4d6137fb 100644 --- a/protocol/dubbo/listener.go +++ b/protocol/dubbo/listener.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang, Alex Stocks -// -// Licensed 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. +/* + * 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 dubbo @@ -19,20 +22,16 @@ import ( "reflect" "sync" "time" -) -import ( "github.com/dubbogo/getty" - "github.com/dubbogo/hessian2" - perrors "github.com/pkg/errors" -) -import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/constant" - "github.com/dubbo/go-for-apache-dubbo/common/logger" - "github.com/dubbo/go-for-apache-dubbo/protocol" - "github.com/dubbo/go-for-apache-dubbo/protocol/invocation" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/constant" + "github.com/apache/dubbo-go/common/logger" + "github.com/apache/dubbo-go/protocol" + "github.com/apache/dubbo-go/protocol/invocation" + hessian "github.com/dubbogo/hessian2" + perrors "github.com/pkg/errors" ) // todo: WritePkg_Timeout will entry *.yml diff --git a/protocol/dubbo/pool.go b/protocol/dubbo/pool.go index 60a65e45fe386a027c6e1556949730cf9ef050f4..b47c146fe783aba2fc2de7fe5df956da4d6bb7d6 100644 --- a/protocol/dubbo/pool.go +++ b/protocol/dubbo/pool.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang, Alex Stocks -// -// Licensed 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. +/* + * 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 dubbo @@ -29,7 +32,7 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common/logger" + "github.com/apache/dubbo-go/common/logger" ) type gettyRPCClient struct { diff --git a/protocol/dubbo/readwriter.go b/protocol/dubbo/readwriter.go index 87b73aed91d5232975b6f6b1513e3d728c0f2175..5de96acaa1ae5a8df7fa5e8182b98be08ac137c3 100644 --- a/protocol/dubbo/readwriter.go +++ b/protocol/dubbo/readwriter.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang, Alex Stocks -// -// Licensed 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. +/* + * 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 dubbo @@ -24,9 +27,9 @@ import ( perrors "github.com/pkg/errors" ) import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/constant" - "github.com/dubbo/go-for-apache-dubbo/common/logger" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/constant" + "github.com/apache/dubbo-go/common/logger" ) //////////////////////////////////////////// diff --git a/protocol/dubbo/server.go b/protocol/dubbo/server.go index f8de070bcc42bf0f81ad2a2e12658f2283bdf210..80568c61bb44b540df0d0689273f22d206411ca4 100644 --- a/protocol/dubbo/server.go +++ b/protocol/dubbo/server.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang, Alex Stocks -// -// Licensed 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. +/* + * 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 dubbo @@ -25,10 +28,10 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/logger" - "github.com/dubbo/go-for-apache-dubbo/config" - "github.com/dubbo/go-for-apache-dubbo/protocol" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/logger" + "github.com/apache/dubbo-go/config" + "github.com/apache/dubbo-go/protocol" ) var srvConf *ServerConfig diff --git a/protocol/invocation.go b/protocol/invocation.go index 0297a556c4708292d7d5706718af596804d788f4..055e7a4cd18707772d6ba75303053f15dc55dbe3 100644 --- a/protocol/invocation.go +++ b/protocol/invocation.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 protocol diff --git a/protocol/invocation/rpcinvocation.go b/protocol/invocation/rpcinvocation.go index 87ab0c67838ba028eab81185eb6d4ccae5679966..c8f45c561ef88f49d33b755f988ff9a125e30c8f 100644 --- a/protocol/invocation/rpcinvocation.go +++ b/protocol/invocation/rpcinvocation.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 invocation @@ -19,9 +22,9 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/constant" - "github.com/dubbo/go-for-apache-dubbo/protocol" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/constant" + "github.com/apache/dubbo-go/protocol" ) ///////////////////////////// diff --git a/protocol/invoker.go b/protocol/invoker.go index bedbb10442031fe8b723286f824c03f321623ca1..fe6aab848caceed50fc3db3e657ce87c45eac2ed 100644 --- a/protocol/invoker.go +++ b/protocol/invoker.go @@ -1,22 +1,25 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 protocol import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/logger" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/logger" ) // Extension - Invoker diff --git a/protocol/jsonrpc/http.go b/protocol/jsonrpc/http.go index 60257ce027c1434bfd5cc06249f380d3511957dd..af65db04b880a0e6d7f18fd5a96b775795be0fab 100644 --- a/protocol/jsonrpc/http.go +++ b/protocol/jsonrpc/http.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Alex Stocks -// -// Licensed 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. +/* + * 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 jsonrpc @@ -34,8 +37,8 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/constant" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/constant" ) ////////////////////////////////////////////// diff --git a/protocol/jsonrpc/http_test.go b/protocol/jsonrpc/http_test.go index 55f86f454e89bc16f409abfa141508207b749279..3f6f983702360b9c3036c943b0651e5c935376e3 100644 --- a/protocol/jsonrpc/http_test.go +++ b/protocol/jsonrpc/http_test.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 jsonrpc @@ -27,9 +30,9 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/constant" - "github.com/dubbo/go-for-apache-dubbo/protocol" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/constant" + "github.com/apache/dubbo-go/protocol" ) type ( diff --git a/protocol/jsonrpc/json.go b/protocol/jsonrpc/json.go index c5c26d3f93172f563bb89642ef0664c904c3e4e8..c147f9add85041b3dfaf1c9463813c560f9238d0 100644 --- a/protocol/jsonrpc/json.go +++ b/protocol/jsonrpc/json.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Alex Stocks -// -// Licensed 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. +/* + * 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 jsonrpc diff --git a/protocol/jsonrpc/json_test.go b/protocol/jsonrpc/json_test.go index c821cc25f1ff93d8af4fd4cf7d405a6ad798a2ff..8d3ac5dabb69acbfc3ca9846ebd1575a53b32eb8 100644 --- a/protocol/jsonrpc/json_test.go +++ b/protocol/jsonrpc/json_test.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 jsonrpc diff --git a/protocol/jsonrpc/jsonrpc_exporter.go b/protocol/jsonrpc/jsonrpc_exporter.go index 144437c10402962b3356706b88f1e2701524a97b..21a2465cddde7709bf5a23f6247ecb74016bf129 100644 --- a/protocol/jsonrpc/jsonrpc_exporter.go +++ b/protocol/jsonrpc/jsonrpc_exporter.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 jsonrpc @@ -19,10 +22,10 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/constant" - "github.com/dubbo/go-for-apache-dubbo/common/logger" - "github.com/dubbo/go-for-apache-dubbo/protocol" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/constant" + "github.com/apache/dubbo-go/common/logger" + "github.com/apache/dubbo-go/protocol" ) type JsonrpcExporter struct { diff --git a/protocol/jsonrpc/jsonrpc_invoker.go b/protocol/jsonrpc/jsonrpc_invoker.go index 75ac88085ff396cde95e1ec2a43a7026777569de..2c130e0d7617e96a1724edc5b63f8e66f251446e 100644 --- a/protocol/jsonrpc/jsonrpc_invoker.go +++ b/protocol/jsonrpc/jsonrpc_invoker.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 jsonrpc @@ -19,11 +22,11 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/constant" - "github.com/dubbo/go-for-apache-dubbo/common/logger" - "github.com/dubbo/go-for-apache-dubbo/protocol" - invocation_impl "github.com/dubbo/go-for-apache-dubbo/protocol/invocation" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/constant" + "github.com/apache/dubbo-go/common/logger" + "github.com/apache/dubbo-go/protocol" + invocation_impl "github.com/apache/dubbo-go/protocol/invocation" ) type JsonrpcInvoker struct { diff --git a/protocol/jsonrpc/jsonrpc_invoker_test.go b/protocol/jsonrpc/jsonrpc_invoker_test.go index 2d248469e2bb35edb1708901615c444a0d712dd0..9641fb532148bc78562755ea4c55696142278951 100644 --- a/protocol/jsonrpc/jsonrpc_invoker_test.go +++ b/protocol/jsonrpc/jsonrpc_invoker_test.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 jsonrpc @@ -25,9 +28,9 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/protocol" - "github.com/dubbo/go-for-apache-dubbo/protocol/invocation" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/protocol" + "github.com/apache/dubbo-go/protocol/invocation" ) func TestJsonrpcInvoker_Invoke(t *testing.T) { diff --git a/protocol/jsonrpc/jsonrpc_protocol.go b/protocol/jsonrpc/jsonrpc_protocol.go index 737c9cb175cedaae081abf6a43dfc605fb906d40..fa4071b4fd75ecc4f0be94f93d31c13a8cccb8f2 100644 --- a/protocol/jsonrpc/jsonrpc_protocol.go +++ b/protocol/jsonrpc/jsonrpc_protocol.go @@ -1,25 +1,28 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 jsonrpc import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/extension" - "github.com/dubbo/go-for-apache-dubbo/common/logger" - "github.com/dubbo/go-for-apache-dubbo/config" - "github.com/dubbo/go-for-apache-dubbo/protocol" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/extension" + "github.com/apache/dubbo-go/common/logger" + "github.com/apache/dubbo-go/config" + "github.com/apache/dubbo-go/protocol" ) const JSONRPC = "jsonrpc" diff --git a/protocol/jsonrpc/jsonrpc_protocol_test.go b/protocol/jsonrpc/jsonrpc_protocol_test.go index 09e43400cdc51431ccd3bcad1389b88f73fac485..866f3d72be7b907cd9e2a8e56528f1b76848646d 100644 --- a/protocol/jsonrpc/jsonrpc_protocol_test.go +++ b/protocol/jsonrpc/jsonrpc_protocol_test.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 jsonrpc @@ -25,9 +28,9 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/config" - "github.com/dubbo/go-for-apache-dubbo/protocol" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/config" + "github.com/apache/dubbo-go/protocol" ) func TestJsonrpcProtocol_Export(t *testing.T) { diff --git a/protocol/jsonrpc/server.go b/protocol/jsonrpc/server.go index 1be5c54d239910c7da7b3fd955512e4120fed4da..a7643dc215e8ae1ef5f7e5b02236f881b0f963c9 100644 --- a/protocol/jsonrpc/server.go +++ b/protocol/jsonrpc/server.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang, Alex Stocks -// -// Licensed 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. +/* + * 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 jsonrpc @@ -34,11 +37,11 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/constant" - "github.com/dubbo/go-for-apache-dubbo/common/logger" - "github.com/dubbo/go-for-apache-dubbo/protocol" - "github.com/dubbo/go-for-apache-dubbo/protocol/invocation" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/constant" + "github.com/apache/dubbo-go/common/logger" + "github.com/apache/dubbo-go/protocol" + "github.com/apache/dubbo-go/protocol/invocation" ) var ( diff --git a/protocol/protocol.go b/protocol/protocol.go index 03b2cfbe50c6757a0e86cf4d10385fef97cd8104..814a85163a99aa3b161b5eafbfed5f13ac4e3eb4 100644 --- a/protocol/protocol.go +++ b/protocol/protocol.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 protocol @@ -19,8 +22,8 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/logger" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/logger" ) // Extension - protocol diff --git a/protocol/protocolwrapper/mock_protocol_filter.go b/protocol/protocolwrapper/mock_protocol_filter.go index 902ccefaa974a003b0eaf45c35d65c5c930b81f7..2efc34da4469cf369d4bbeb871ccfbdb73123f6a 100644 --- a/protocol/protocolwrapper/mock_protocol_filter.go +++ b/protocol/protocolwrapper/mock_protocol_filter.go @@ -1,29 +1,32 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 protocolwrapper import ( "sync" ) + import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/protocol" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/protocol" ) -type mockProtocolFilter struct { -} +type mockProtocolFilter struct{} func NewMockProtocolFilter() protocol.Protocol { return &mockProtocolFilter{} diff --git a/protocol/protocolwrapper/protocol_filter_wrapper.go b/protocol/protocolwrapper/protocol_filter_wrapper.go index f6583f99ed3f9a0b3ff0f3b1ff46c9c637de39ba..b1392fff511dba2e2cbedf2547d6be2d4276a912 100644 --- a/protocol/protocolwrapper/protocol_filter_wrapper.go +++ b/protocol/protocolwrapper/protocol_filter_wrapper.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 protocolwrapper @@ -19,11 +22,11 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/constant" - "github.com/dubbo/go-for-apache-dubbo/common/extension" - "github.com/dubbo/go-for-apache-dubbo/filter" - "github.com/dubbo/go-for-apache-dubbo/protocol" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/constant" + "github.com/apache/dubbo-go/common/extension" + "github.com/apache/dubbo-go/filter" + "github.com/apache/dubbo-go/protocol" ) const ( diff --git a/protocol/protocolwrapper/protocol_filter_wrapper_test.go b/protocol/protocolwrapper/protocol_filter_wrapper_test.go index 49015cdc4b0ce813f7d46d34b3e8ff2a52db80b9..8131accfd3105d101042c1c51178f2794ebc47f6 100644 --- a/protocol/protocolwrapper/protocol_filter_wrapper_test.go +++ b/protocol/protocolwrapper/protocol_filter_wrapper_test.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 protocolwrapper @@ -24,11 +27,11 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/constant" - "github.com/dubbo/go-for-apache-dubbo/common/extension" - "github.com/dubbo/go-for-apache-dubbo/filter/impl" - "github.com/dubbo/go-for-apache-dubbo/protocol" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/constant" + "github.com/apache/dubbo-go/common/extension" + "github.com/apache/dubbo-go/filter/impl" + "github.com/apache/dubbo-go/protocol" ) func TestProtocolFilterWrapper_Export(t *testing.T) { diff --git a/protocol/result.go b/protocol/result.go index adcce8a5ec04ddd390d6eeea365fe9fe2553e123..f6e27280216641269cfc031888ea53176cc8b225 100644 --- a/protocol/result.go +++ b/protocol/result.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Yincheng Fang -// -// Licensed 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. +/* + * 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 protocol diff --git a/registry/directory/directory.go b/registry/directory/directory.go index 4c6b22db1cde469b8291e588013be874660a2703..32841be5f68b07b1f87d2080834de83debb53893 100644 --- a/registry/directory/directory.go +++ b/registry/directory/directory.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 directory @@ -24,21 +27,24 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/cluster/directory" - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/constant" - "github.com/dubbo/go-for-apache-dubbo/common/extension" - "github.com/dubbo/go-for-apache-dubbo/common/logger" - "github.com/dubbo/go-for-apache-dubbo/protocol" - "github.com/dubbo/go-for-apache-dubbo/protocol/protocolwrapper" - "github.com/dubbo/go-for-apache-dubbo/registry" + "github.com/apache/dubbo-go/cluster/directory" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/constant" + "github.com/apache/dubbo-go/common/extension" + "github.com/apache/dubbo-go/common/logger" + "github.com/apache/dubbo-go/protocol" + "github.com/apache/dubbo-go/protocol/protocolwrapper" + "github.com/apache/dubbo-go/registry" ) -const RegistryConnDelay = 3 +const ( + RegistryConnDelay = 3 +) type Options struct { serviceTTL time.Duration } + type Option func(*Options) type registryDirectory struct { diff --git a/registry/directory/directory_test.go b/registry/directory/directory_test.go index 521bd84f01eba1881528ee4ff91b02ff63412246..eafd3f7c17a47520bd91e99176814753f5d7ddef 100644 --- a/registry/directory/directory_test.go +++ b/registry/directory/directory_test.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 directory @@ -21,17 +24,19 @@ import ( "testing" "time" ) + import ( "github.com/stretchr/testify/assert" ) + import ( - "github.com/dubbo/go-for-apache-dubbo/cluster/cluster_impl" - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/constant" - "github.com/dubbo/go-for-apache-dubbo/common/extension" - "github.com/dubbo/go-for-apache-dubbo/protocol/invocation" - "github.com/dubbo/go-for-apache-dubbo/protocol/protocolwrapper" - "github.com/dubbo/go-for-apache-dubbo/registry" + "github.com/apache/dubbo-go/cluster/cluster_impl" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/constant" + "github.com/apache/dubbo-go/common/extension" + "github.com/apache/dubbo-go/protocol/invocation" + "github.com/apache/dubbo-go/protocol/protocolwrapper" + "github.com/apache/dubbo-go/registry" ) func TestSubscribe(t *testing.T) { @@ -48,8 +53,8 @@ func TestSubscribe_Delete(t *testing.T) { mockRegistry.MockEvent(®istry.ServiceEvent{Action: registry.ServiceDel, Service: *common.NewURLWithOptions("TEST0", common.WithProtocol("dubbo"))}) time.Sleep(1e9) assert.Len(t, registryDirectory.cacheInvokers, 2) - } + func TestSubscribe_InvalidUrl(t *testing.T) { url, _ := common.NewURL(context.TODO(), "mock://127.0.0.1:1111") mockRegistry, _ := registry.NewMockRegistry(&common.URL{}) diff --git a/registry/event.go b/registry/event.go index 51a21ac37ce0d2b7fbb82a4d88ad636dfec3ee9d..ef51bbbe1710b1fdb166d34af58c630a5203b53a 100644 --- a/registry/event.go +++ b/registry/event.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 registry @@ -19,8 +22,9 @@ import ( "math/rand" "time" ) + import ( - "github.com/dubbo/go-for-apache-dubbo/common" + "github.com/apache/dubbo-go/common" ) func init() { diff --git a/registry/mock_registry.go b/registry/mock_registry.go index 16a0942b76918fc7bdd012d35dbb5a435d8d0a95..1fc700edb7cf37eb2613c90d458c58d278507faf 100644 --- a/registry/mock_registry.go +++ b/registry/mock_registry.go @@ -1,24 +1,28 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 registry import ( "go.uber.org/atomic" ) + import ( - "github.com/dubbo/go-for-apache-dubbo/common" + "github.com/apache/dubbo-go/common" ) type MockRegistry struct { diff --git a/registry/protocol/protocol.go b/registry/protocol/protocol.go index 24763c9d52fbaf84e5554953348a51ae105aebd6..ff33b5fe6e063257c12035f3262e0daae874363e 100644 --- a/registry/protocol/protocol.go +++ b/registry/protocol/protocol.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 protocol @@ -19,17 +22,19 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/constant" - "github.com/dubbo/go-for-apache-dubbo/common/extension" - "github.com/dubbo/go-for-apache-dubbo/common/logger" - "github.com/dubbo/go-for-apache-dubbo/protocol" - "github.com/dubbo/go-for-apache-dubbo/protocol/protocolwrapper" - "github.com/dubbo/go-for-apache-dubbo/registry" - directory2 "github.com/dubbo/go-for-apache-dubbo/registry/directory" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/constant" + "github.com/apache/dubbo-go/common/extension" + "github.com/apache/dubbo-go/common/logger" + "github.com/apache/dubbo-go/protocol" + "github.com/apache/dubbo-go/protocol/protocolwrapper" + "github.com/apache/dubbo-go/registry" + directory2 "github.com/apache/dubbo-go/registry/directory" ) -var regProtocol *registryProtocol +var ( + regProtocol *registryProtocol +) type registryProtocol struct { invokers []protocol.Invoker diff --git a/registry/protocol/protocol_test.go b/registry/protocol/protocol_test.go index f1bb2fc5a7e3125933c75e9786cfbffa0c5353fd..418f1f6779679b6eb93a74ff7689ca8e76f2c0af 100644 --- a/registry/protocol/protocol_test.go +++ b/registry/protocol/protocol_test.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 protocol @@ -18,17 +21,19 @@ import ( "context" "testing" ) + import ( "github.com/stretchr/testify/assert" ) + import ( - cluster "github.com/dubbo/go-for-apache-dubbo/cluster/cluster_impl" - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/constant" - "github.com/dubbo/go-for-apache-dubbo/common/extension" - "github.com/dubbo/go-for-apache-dubbo/protocol" - "github.com/dubbo/go-for-apache-dubbo/protocol/protocolwrapper" - "github.com/dubbo/go-for-apache-dubbo/registry" + cluster "github.com/apache/dubbo-go/cluster/cluster_impl" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/constant" + "github.com/apache/dubbo-go/common/extension" + "github.com/apache/dubbo-go/protocol" + "github.com/apache/dubbo-go/protocol/protocolwrapper" + "github.com/apache/dubbo-go/registry" ) func referNormal(t *testing.T, regProtocol *registryProtocol) { @@ -46,6 +51,7 @@ func referNormal(t *testing.T, regProtocol *registryProtocol) { assert.IsType(t, &protocol.BaseInvoker{}, invoker) assert.Equal(t, invoker.GetUrl().String(), url.String()) } + func TestRefer(t *testing.T) { regProtocol := newRegistryProtocol() referNormal(t, regProtocol) @@ -85,6 +91,7 @@ func TestOneRegRefer(t *testing.T) { }) assert.Equal(t, count, 1) } + func exporterNormal(t *testing.T, regProtocol *registryProtocol) { extension.SetProtocol("registry", GetProtocol) extension.SetRegistry("mock", registry.NewMockRegistry) diff --git a/registry/registry.go b/registry/registry.go index 28ca1a1c19d7e2ffa72797be7bdf221338c19a45..b41ac534ba7daa588bd47d3327383047358033bc 100644 --- a/registry/registry.go +++ b/registry/registry.go @@ -1,21 +1,24 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 registry import ( - "github.com/dubbo/go-for-apache-dubbo/common" + "github.com/apache/dubbo-go/common" ) // Extension - Registry diff --git a/registry/zookeeper/listener.go b/registry/zookeeper/listener.go index 13ccd86faf5abce2a0369ae61b66d18ae7190ec7..711b876ef2bb2339423a56423155441ae54657f3 100644 --- a/registry/zookeeper/listener.go +++ b/registry/zookeeper/listener.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 @@ -28,12 +31,9 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common/logger" -) - -import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/registry" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/logger" + "github.com/apache/dubbo-go/registry" ) const ( diff --git a/registry/zookeeper/registry.go b/registry/zookeeper/registry.go index 4d553a1658a15416cbcf00c107aeffca11b5031b..fbcc9e4546b908f5d11d3b2f8915003fa9512be2 100644 --- a/registry/zookeeper/registry.go +++ b/registry/zookeeper/registry.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 @@ -26,18 +29,18 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common/logger" + "github.com/apache/dubbo-go/common/logger" perrors "github.com/pkg/errors" "github.com/samuel/go-zookeeper/zk" ) import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/constant" - "github.com/dubbo/go-for-apache-dubbo/common/extension" - "github.com/dubbo/go-for-apache-dubbo/common/utils" - "github.com/dubbo/go-for-apache-dubbo/registry" - "github.com/dubbo/go-for-apache-dubbo/version" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/constant" + "github.com/apache/dubbo-go/common/extension" + "github.com/apache/dubbo-go/common/utils" + "github.com/apache/dubbo-go/registry" + "github.com/apache/dubbo-go/version" ) const ( diff --git a/registry/zookeeper/registry_test.go b/registry/zookeeper/registry_test.go index 3d230bb0a98eef74087f30e1adcf10427433ef7d..2e85e12f3a87df880b78dc70760efaa7e6dd8203 100644 --- a/registry/zookeeper/registry_test.go +++ b/registry/zookeeper/registry_test.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 @@ -20,12 +23,14 @@ import ( "testing" "time" ) + import ( "github.com/stretchr/testify/assert" ) + import ( - "github.com/dubbo/go-for-apache-dubbo/common" - "github.com/dubbo/go-for-apache-dubbo/common/constant" + "github.com/apache/dubbo-go/common" + "github.com/apache/dubbo-go/common/constant" ) func Test_Register(t *testing.T) { diff --git a/registry/zookeeper/zk_client.go b/registry/zookeeper/zk_client.go index d11b5f7e5d07573fec2e41fc7eb9d52c51c77d77..a8b14bb2bd04938e84cf3c7f482f6ae650c3c98b 100644 --- a/registry/zookeeper/zk_client.go +++ b/registry/zookeeper/zk_client.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 @@ -22,7 +25,7 @@ import ( ) import ( - "github.com/dubbo/go-for-apache-dubbo/common/logger" + "github.com/apache/dubbo-go/common/logger" perrors "github.com/pkg/errors" "github.com/samuel/go-zookeeper/zk" ) @@ -102,6 +105,7 @@ func newZookeeperClient(name string, zkAddrs []string, timeout time.Duration) (* return z, nil } + func newMockZookeeperClient(name string, timeout time.Duration) (*zk.TestCluster, *zookeeperClient, <-chan zk.Event, error) { var ( err error diff --git a/registry/zookeeper/zk_client_test.go b/registry/zookeeper/zk_client_test.go index 808b6fcff9d173e406adbc669a8c0b82b41ea3a3..ff98bb5bc783da0908c5f3cbe28c94385b0bd1db 100644 --- a/registry/zookeeper/zk_client_test.go +++ b/registry/zookeeper/zk_client_test.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 hxmhlt -// -// Licensed 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. +/* + * 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 @@ -19,6 +22,7 @@ import ( "testing" "time" ) + import ( "github.com/samuel/go-zookeeper/zk" "github.com/stretchr/testify/assert" @@ -43,6 +47,7 @@ func verifyEventStateOrder(t *testing.T, c <-chan zk.Event, expectedStates []zk. } } } + func verifyEventOrder(t *testing.T, c <-chan zk.Event, expectedEvent []zk.EventType, source string) { for _, e := range expectedEvent { for { diff --git a/version/version.go b/version/version.go index ff30d03190da19411333ecceb857690d462bb10b..b9a076e78cbf0c9c7b5172e1b30c84f60f250ea7 100644 --- a/version/version.go +++ b/version/version.go @@ -1,16 +1,19 @@ -// Copyright 2016-2019 Alex Stocks -// -// Licensed 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. +/* + * 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 version