Skip to content
Snippets Groups Projects
Commit de017029 authored by AlexStocks's avatar AlexStocks
Browse files

Mod: delete AS in remark

parent b68a5f44
No related branches found
No related tags found
No related merge requests found
Showing
with 287 additions and 158 deletions
...@@ -176,7 +176,6 @@ ...@@ -176,7 +176,6 @@
END OF TERMS AND CONDITIONS END OF TERMS AND CONDITIONS
Copyright (c) 2016 ~ 2018 Alex Stocks.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with 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 package loadbalance
import ( import (
......
...@@ -27,6 +27,7 @@ import ( ...@@ -27,6 +27,7 @@ import (
"net/url" "net/url"
"strconv" "strconv"
"strings" "strings"
"sync"
) )
import ( import (
...@@ -64,10 +65,12 @@ func (t RoleType) Role() string { ...@@ -64,10 +65,12 @@ func (t RoleType) Role() string {
} }
type baseUrl struct { type baseUrl struct {
Protocol string Protocol string
Location string // ip+port Location string // ip+port
Ip string Ip string
Port string Port string
//url.Values is not safe map, add to avoid concurrent map read and map write error
paramsLock sync.RWMutex
Params url.Values Params url.Values
PrimitiveURL string PrimitiveURL string
ctx context.Context ctx context.Context
...@@ -283,14 +286,18 @@ func (c URL) Service() string { ...@@ -283,14 +286,18 @@ func (c URL) Service() string {
} }
func (c *URL) AddParam(key string, value string) { func (c *URL) AddParam(key string, value string) {
c.paramsLock.Lock()
c.Params.Add(key, value) c.Params.Add(key, value)
c.paramsLock.Unlock()
} }
func (c URL) GetParam(s string, d string) string { func (c URL) GetParam(s string, d string) string {
var r string var r string
if r = c.Params.Get(s); r == "" { c.paramsLock.RLock()
if r = c.Params.Get(s); len(r) == 0 {
r = d r = d
} }
c.paramsLock.RUnlock()
return r return r
} }
func (c URL) GetParamAndDecoded(key string) (string, error) { func (c URL) GetParamAndDecoded(key string) (string, error) {
......
...@@ -36,8 +36,8 @@ var ( ...@@ -36,8 +36,8 @@ var (
maxWait = 3 maxWait = 3
) )
// loaded comsumer & provider config from xxx.yml, and log config from xxx.xml // loaded consumer & provider config from xxx.yml, and log config from xxx.xml
// Namely: dubbo.comsumer.xml & dubbo.provider.xml in java dubbo // Namely: dubbo.consumer.xml & dubbo.provider.xml in java dubbo
func init() { func init() {
var ( var (
confConFile, confProFile string confConFile, confProFile string
...@@ -70,9 +70,8 @@ func Load() { ...@@ -70,9 +70,8 @@ func Load() {
SetConsumerService(genericService) SetConsumerService(genericService)
} }
rpcService := GetConsumerService(key) rpcService := GetConsumerService(key)
if rpcService == nil { if rpcService == nil {
logger.Warnf("%s is not exsist!", key) logger.Warnf("%s does not exist!", key)
continue continue
} }
ref.id = key ref.id = key
...@@ -99,7 +98,7 @@ func Load() { ...@@ -99,7 +98,7 @@ func Load() {
break break
} }
if refconfig.invoker == nil { if refconfig.invoker == nil {
logger.Warnf("The interface %s invoker not exsist , may you should check your interface config.", refconfig.InterfaceName) logger.Warnf("The interface %s invoker not exist , may you should check your interface config.", refconfig.InterfaceName)
} }
} }
} }
...@@ -120,7 +119,7 @@ func Load() { ...@@ -120,7 +119,7 @@ func Load() {
for key, svs := range providerConfig.Services { for key, svs := range providerConfig.Services {
rpcService := GetProviderService(key) rpcService := GetProviderService(key)
if rpcService == nil { if rpcService == nil {
logger.Warnf("%s is not exsist!", key) logger.Warnf("%s does not exist!", key)
continue continue
} }
svs.id = key svs.id = key
......
#!/usr/bin/env bash #!/usr/bin/env bash
# ****************************************************** #
# DESC : dubbogo app devops script # Licensed to the Apache Software Foundation (ASF) under one or more
# AUTHOR : Alex Stocks # contributor license agreements. See the NOTICE file distributed with
# VERSION : 1.0 # this work for additional information regarding copyright ownership.
# LICENCE : Apache License 2.0 # The ASF licenses this file to You under the Apache License, Version 2.0
# EMAIL : alexstocks@foxmail.com # (the "License"); you may not use this file except in compliance with
# MOD : 2016-05-13 02:01 # the License. You may obtain a copy of the License at
# FILE : load.sh #
# ****************************************************** # 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.
APP_NAME="APPLICATION_NAME" APP_NAME="APPLICATION_NAME"
APP_ARGS="" APP_ARGS=""
......
# dubbogo application configure script #
# ****************************************************** # Licensed to the Apache Software Foundation (ASF) under one or more
# DESC : dubbogo environment variable # contributor license agreements. See the NOTICE file distributed with
# AUTHOR : Alex Stocks # this work for additional information regarding copyright ownership.
# VERSION : 1.0 # The ASF licenses this file to You under the Apache License, Version 2.0
# LICENCE : Apache License 2.0 # (the "License"); you may not use this file except in compliance with
# EMAIL : alexstocks@foxmail.com # the License. You may obtain a copy of the License at
# MOD : 2016-07-12 16:29 #
# FILE : app.properties # 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.
export TARGET_EXEC_NAME="user_info_client" export TARGET_EXEC_NAME="user_info_client"
# BUILD_PACKAGE="dubbogo-examples/user-info/client/app" # BUILD_PACKAGE="dubbogo-examples/user-info/client/app"
......
#!/usr/bin/env bash #!/usr/bin/env bash
# ****************************************************** #
# DESC : build script # Licensed to the Apache Software Foundation (ASF) under one or more
# AUTHOR : Alex Stocks # contributor license agreements. See the NOTICE file distributed with
# VERSION : 1.0 # this work for additional information regarding copyright ownership.
# LICENCE : Apache License 2.0 # The ASF licenses this file to You under the Apache License, Version 2.0
# EMAIL : alexstocks@foxmail.com # (the "License"); you may not use this file except in compliance with
# MOD : 2016-07-12 16:28 # the License. You may obtain a copy of the License at
# FILE : build.sh #
# ****************************************************** # 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.
rm -rf target/ rm -rf target/
......
#!/usr/bin/env bash #!/usr/bin/env bash
# ****************************************************** #
# DESC : build script for dev env # Licensed to the Apache Software Foundation (ASF) under one or more
# AUTHOR : Alex Stocks # contributor license agreements. See the NOTICE file distributed with
# VERSION : 1.0 # this work for additional information regarding copyright ownership.
# LICENCE : Apache License 2.0 # The ASF licenses this file to You under the Apache License, Version 2.0
# EMAIL : alexstocks@foxmail.com # (the "License"); you may not use this file except in compliance with
# MOD : 2017-10-18 13:24 # the License. You may obtain a copy of the License at
# FILE : dev.sh #
# ****************************************************** # 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.
set -e set -e
......
#!/usr/bin/env bash #!/usr/bin/env bash
# ****************************************************** #
# DESC : build script for release env # Licensed to the Apache Software Foundation (ASF) under one or more
# AUTHOR : Alex Stocks # contributor license agreements. See the NOTICE file distributed with
# VERSION : 1.0 # this work for additional information regarding copyright ownership.
# LICENCE : Apache License 2.0 # The ASF licenses this file to You under the Apache License, Version 2.0
# EMAIL : alexstocks@foxmail.com # (the "License"); you may not use this file except in compliance with
# MOD : 2016-07-12 16:34 # the License. You may obtain a copy of the License at
# FILE : test.sh #
# ****************************************************** # 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.
set -e set -e
......
#!/usr/bin/env bash #!/usr/bin/env bash
# ****************************************************** #
# DESC : build script for test env # Licensed to the Apache Software Foundation (ASF) under one or more
# AUTHOR : Alex Stocks # contributor license agreements. See the NOTICE file distributed with
# VERSION : 1.0 # this work for additional information regarding copyright ownership.
# LICENCE : Apache License 2.0 # The ASF licenses this file to You under the Apache License, Version 2.0
# EMAIL : alexstocks@foxmail.com # (the "License"); you may not use this file except in compliance with
# MOD : 2016-07-12 16:34 # the License. You may obtain a copy of the License at
# FILE : test.sh #
# ****************************************************** # 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.
set -e set -e
......
#!/usr/bin/env bash #!/usr/bin/env bash
# ****************************************************** #
# DESC : build script for dev env # Licensed to the Apache Software Foundation (ASF) under one or more
# AUTHOR : Alex Stocks # contributor license agreements. See the NOTICE file distributed with
# VERSION : 1.0 # this work for additional information regarding copyright ownership.
# LICENCE : Apache License 2.0 # The ASF licenses this file to You under the Apache License, Version 2.0
# EMAIL : alexstocks@foxmail.com # (the "License"); you may not use this file except in compliance with
# MOD : 2017-10-18 13:24 # the License. You may obtain a copy of the License at
# FILE : dev.sh #
# ****************************************************** # 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.
set -e set -e
......
#!/usr/bin/env bash #!/usr/bin/env bash
# ****************************************************** #
# DESC : build script for release env # Licensed to the Apache Software Foundation (ASF) under one or more
# AUTHOR : Alex Stocks # contributor license agreements. See the NOTICE file distributed with
# VERSION : 1.0 # this work for additional information regarding copyright ownership.
# LICENCE : Apache License 2.0 # The ASF licenses this file to You under the Apache License, Version 2.0
# EMAIL : alexstocks@foxmail.com # (the "License"); you may not use this file except in compliance with
# MOD : 2016-07-12 16:34 # the License. You may obtain a copy of the License at
# FILE : test.sh #
# ****************************************************** # 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.
set -e set -e
......
#!/usr/bin/env bash #!/usr/bin/env bash
# ****************************************************** #
# DESC : build script for test env # Licensed to the Apache Software Foundation (ASF) under one or more
# AUTHOR : Alex Stocks # contributor license agreements. See the NOTICE file distributed with
# VERSION : 1.0 # this work for additional information regarding copyright ownership.
# LICENCE : Apache License 2.0 # The ASF licenses this file to You under the Apache License, Version 2.0
# EMAIL : alexstocks@foxmail.com # (the "License"); you may not use this file except in compliance with
# MOD : 2016-07-12 16:34 # the License. You may obtain a copy of the License at
# FILE : test.sh #
# ****************************************************** # 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.
set -e set -e
......
#!/usr/bin/env bash #!/usr/bin/env bash
# ****************************************************** #
# DESC : build script for dev env # Licensed to the Apache Software Foundation (ASF) under one or more
# AUTHOR : Alex Stocks # contributor license agreements. See the NOTICE file distributed with
# VERSION : 1.0 # this work for additional information regarding copyright ownership.
# LICENCE : Apache License 2.0 # The ASF licenses this file to You under the Apache License, Version 2.0
# EMAIL : alexstocks@foxmail.com # (the "License"); you may not use this file except in compliance with
# MOD : 2017-10-18 13:24 # the License. You may obtain a copy of the License at
# FILE : dev.sh #
# ****************************************************** # 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.
set -e set -e
......
#!/usr/bin/env bash #!/usr/bin/env bash
# ****************************************************** #
# DESC : build script for release env # Licensed to the Apache Software Foundation (ASF) under one or more
# AUTHOR : Alex Stocks # contributor license agreements. See the NOTICE file distributed with
# VERSION : 1.0 # this work for additional information regarding copyright ownership.
# LICENCE : Apache License 2.0 # The ASF licenses this file to You under the Apache License, Version 2.0
# EMAIL : alexstocks@foxmail.com # (the "License"); you may not use this file except in compliance with
# MOD : 2016-07-12 16:34 # the License. You may obtain a copy of the License at
# FILE : test.sh #
# ****************************************************** # 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.
set -e set -e
......
#!/usr/bin/env bash #!/usr/bin/env bash
# ****************************************************** #
# DESC : build script for test env # Licensed to the Apache Software Foundation (ASF) under one or more
# AUTHOR : Alex Stocks # contributor license agreements. See the NOTICE file distributed with
# VERSION : 1.0 # this work for additional information regarding copyright ownership.
# LICENCE : Apache License 2.0 # The ASF licenses this file to You under the Apache License, Version 2.0
# EMAIL : alexstocks@foxmail.com # (the "License"); you may not use this file except in compliance with
# MOD : 2016-07-12 16:34 # the License. You may obtain a copy of the License at
# FILE : test.sh #
# ****************************************************** # 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.
set -e set -e
......
#!/usr/bin/env bash #!/usr/bin/env bash
# ****************************************************** #
# DESC : dubbogo app devops script # Licensed to the Apache Software Foundation (ASF) under one or more
# AUTHOR : Alex Stocks # contributor license agreements. See the NOTICE file distributed with
# VERSION : 1.0 # this work for additional information regarding copyright ownership.
# LICENCE : Apache License 2.0 # The ASF licenses this file to You under the Apache License, Version 2.0
# EMAIL : alexstocks@foxmail.com # (the "License"); you may not use this file except in compliance with
# MOD : 2016-05-13 02:01 # the License. You may obtain a copy of the License at
# FILE : load.sh #
# ****************************************************** # 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.
APP_NAME="APPLICATION_NAME" APP_NAME="APPLICATION_NAME"
APP_ARGS="" APP_ARGS=""
......
# dubbogo application configure script #
# ****************************************************** # Licensed to the Apache Software Foundation (ASF) under one or more
# DESC : application environment variable # contributor license agreements. See the NOTICE file distributed with
# AUTHOR : Alex Stocks # this work for additional information regarding copyright ownership.
# VERSION : 1.0 # The ASF licenses this file to You under the Apache License, Version 2.0
# LICENCE : Apache License 2.0 # (the "License"); you may not use this file except in compliance with
# EMAIL : alexstocks@foxmail.com # the License. You may obtain a copy of the License at
# MOD : 2016-07-12 16:29 #
# FILE : app.properties # 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.
TARGET_EXEC_NAME="user_info_server" TARGET_EXEC_NAME="user_info_server"
# BUILD_PACKAGE="dubbogo-examples/user-info/server/app" # BUILD_PACKAGE="dubbogo-examples/user-info/server/app"
......
#!/usr/bin/env bash #!/usr/bin/env bash
# ****************************************************** #
# DESC : build script # Licensed to the Apache Software Foundation (ASF) under one or more
# AUTHOR : Alex Stocks # contributor license agreements. See the NOTICE file distributed with
# VERSION : 1.0 # this work for additional information regarding copyright ownership.
# LICENCE : Apache License 2.0 # The ASF licenses this file to You under the Apache License, Version 2.0
# EMAIL : alexstocks@foxmail.com # (the "License"); you may not use this file except in compliance with
# MOD : 2016-07-12 16:28 # the License. You may obtain a copy of the License at
# FILE : build.sh #
# ****************************************************** # 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.
rm -rf target/ rm -rf target/
......
#!/usr/bin/env bash #!/usr/bin/env bash
# ****************************************************** #
# DESC : build script for dev env # Licensed to the Apache Software Foundation (ASF) under one or more
# AUTHOR : Alex Stocks # contributor license agreements. See the NOTICE file distributed with
# VERSION : 1.0 # this work for additional information regarding copyright ownership.
# LICENCE : Apache License 2.0 # The ASF licenses this file to You under the Apache License, Version 2.0
# EMAIL : alexstocks@foxmail.com # (the "License"); you may not use this file except in compliance with
# MOD : 2018-06-24 17:32 # the License. You may obtain a copy of the License at
# FILE : dev.sh #
# ****************************************************** # 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.
set -e set -e
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment