You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2020/08/09 16:15:08 UTC
[dubbo-go] branch develop updated (967faf8 -> 25281bf)
This is an automated email from the ASF dual-hosted git repository.
alexstocks pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git.
from 967faf8 Merge pull request #702 from dubbo-x/fix
new 58dc145 Correct words and Format codes
new 2791895 Format codes
new 25281bf add nolint
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
README.md | 2 +-
cluster/loadbalance/consistent_hash.go | 2 +-
cluster/router/condition/router.go | 4 ++--
cluster/router/healthcheck/default_health_check.go | 10 +++++-----
protocol/dubbo/client.go | 2 +-
protocol/dubbo/codec.go | 2 +-
protocol/grpc/server.go | 2 +-
protocol/invocation/rpcinvocation.go | 4 ++--
protocol/result.go | 2 +-
registry/etcdv3/service_discovery.go | 2 +-
registry/nacos/listener.go | 6 +++---
registry/registry.go | 2 +-
remoting/kubernetes/registry_controller.go | 2 +-
remoting/zookeeper/client.go | 2 +-
14 files changed, 22 insertions(+), 22 deletions(-)
[dubbo-go] 03/03: add nolint
Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
alexstocks pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git
commit 25281bf920ca4be71d9e8088813261fd602ce7b5
Author: lihaowei <ha...@gmail.com>
AuthorDate: Sun Aug 9 14:12:22 2020 +0800
add nolint
---
protocol/dubbo/client.go | 2 +-
protocol/dubbo/codec.go | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/protocol/dubbo/client.go b/protocol/dubbo/client.go
index 54752ee..253427f 100644
--- a/protocol/dubbo/client.go
+++ b/protocol/dubbo/client.go
@@ -193,7 +193,7 @@ type Response struct {
atta map[string]string
}
-// NewResponse create a new Response.
+// nolint
func NewResponse(reply interface{}, atta map[string]string) *Response {
return &Response{
reply: reply,
diff --git a/protocol/dubbo/codec.go b/protocol/dubbo/codec.go
index 8ba725e..9781c70 100644
--- a/protocol/dubbo/codec.go
+++ b/protocol/dubbo/codec.go
@@ -82,7 +82,7 @@ func (p *DubboPackage) Marshal() (*bytes.Buffer, error) {
return bytes.NewBuffer(pkg), nil
}
-// Unmarshal decode hessian package.
+// Unmarshal decodes hessian package.
func (p *DubboPackage) Unmarshal(buf *bytes.Buffer, opts ...interface{}) error {
// fix issue https://github.com/apache/dubbo-go/issues/380
bufLen := buf.Len()
[dubbo-go] 01/03: Correct words and Format codes
Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
alexstocks pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git
commit 58dc14556ab8c0d7f77ddbde79ff5f2a73ca9f1f
Author: lihaowei <ha...@gmail.com>
AuthorDate: Sun Aug 9 10:58:05 2020 +0800
Correct words and Format codes
---
README.md | 2 +-
cluster/loadbalance/consistent_hash.go | 2 +-
cluster/router/condition/router.go | 4 ++--
cluster/router/healthcheck/default_health_check.go | 10 +++++-----
protocol/dubbo/client.go | 2 +-
protocol/grpc/server.go | 2 +-
protocol/invocation/rpcinvocation.go | 4 ++--
protocol/result.go | 2 +-
registry/etcdv3/service_discovery.go | 2 +-
registry/nacos/listener.go | 4 ++--
registry/registry.go | 2 +-
remoting/kubernetes/registry_controller.go | 2 +-
remoting/zookeeper/client.go | 2 +-
13 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/README.md b/README.md
index a1c09fc..7df7e79 100644
--- a/README.md
+++ b/README.md
@@ -34,7 +34,7 @@ Both extension module and layered project architecture is according to Apache Du

-If you wanna know more about dubbo-go, please visit this reference [Project Architeture design](https://github.com/apache/dubbo-go/wiki/dubbo-go-V1.0-design)
+If you wanna know more about dubbo-go, please visit this reference [Project Architecture design](https://github.com/apache/dubbo-go/wiki/dubbo-go-V1.0-design)
## Feature list ##
diff --git a/cluster/loadbalance/consistent_hash.go b/cluster/loadbalance/consistent_hash.go
index 85eb964..27ce236 100644
--- a/cluster/loadbalance/consistent_hash.go
+++ b/cluster/loadbalance/consistent_hash.go
@@ -42,7 +42,7 @@ const (
ConsistentHash = "consistenthash"
// HashNodes hash nodes
HashNodes = "hash.nodes"
- // HashArguments key of hash arguments in url
+ // HashArguments key of hash arguments in url
HashArguments = "hash.arguments"
)
diff --git a/cluster/router/condition/router.go b/cluster/router/condition/router.go
index 800293d..751b5a7 100644
--- a/cluster/router/condition/router.go
+++ b/cluster/router/condition/router.go
@@ -294,7 +294,7 @@ func matchCondition(pairs map[string]MatchPair, url *common.URL, param *common.U
return result
}
-// MatchPair Match key pair , condition process
+// MatchPair Match key pair, condition process
type MatchPair struct {
Matches *gxset.HashSet
Mismatches *gxset.HashSet
@@ -320,7 +320,7 @@ func (pair MatchPair) isMatch(value string, param *common.URL) bool {
return true
}
if !pair.Mismatches.Empty() && !pair.Matches.Empty() {
- //when both mismatches and matches contain the same value, then using mismatches first
+ // when both mismatches and matches contain the same value, then using mismatches first
for mismatch := range pair.Mismatches.Items {
if isMatchGlobalPattern(mismatch.(string), value, param) {
return false
diff --git a/cluster/router/healthcheck/default_health_check.go b/cluster/router/healthcheck/default_health_check.go
index a26f86d..c693b86 100644
--- a/cluster/router/healthcheck/default_health_check.go
+++ b/cluster/router/healthcheck/default_health_check.go
@@ -49,7 +49,7 @@ type DefaultHealthChecker struct {
// and the current active request
func (c *DefaultHealthChecker) IsHealthy(invoker protocol.Invoker) bool {
urlStatus := protocol.GetURLStatus(invoker.GetUrl())
- if c.isCircuitBreakerTripped(urlStatus) || urlStatus.GetActive() > c.GetOutStandingRequestConutLimit() {
+ if c.isCircuitBreakerTripped(urlStatus) || urlStatus.GetActive() > c.GetOutStandingRequestCountLimit() {
logger.Debugf("Invoker [%s] is currently in circuitbreaker tripped state", invoker.GetUrl().Key())
return false
}
@@ -92,18 +92,18 @@ func (c *DefaultHealthChecker) getCircuitBreakerSleepWindowTime(status *protocol
return int64(sleepWindow)
}
-// GetOutStandingRequestConutLimit return the requestSuccessiveFailureThreshold bound to this DefaultHealthChecker
+// GetRequestSuccessiveFailureThreshold return the requestSuccessiveFailureThreshold bound to this DefaultHealthChecker
func (c *DefaultHealthChecker) GetRequestSuccessiveFailureThreshold() int32 {
return c.requestSuccessiveFailureThreshold
}
-// GetOutStandingRequestConutLimit return the circuitTrippedTimeoutFactor bound to this DefaultHealthChecker
+// GetCircuitTrippedTimeoutFactor return the circuitTrippedTimeoutFactor bound to this DefaultHealthChecker
func (c *DefaultHealthChecker) GetCircuitTrippedTimeoutFactor() int32 {
return c.circuitTrippedTimeoutFactor
}
-// GetOutStandingRequestConutLimit return the outStandingRequestConutLimit bound to this DefaultHealthChecker
-func (c *DefaultHealthChecker) GetOutStandingRequestConutLimit() int32 {
+// GetOutStandingRequestCountLimit return the outStandingRequestConutLimit bound to this DefaultHealthChecker
+func (c *DefaultHealthChecker) GetOutStandingRequestCountLimit() int32 {
return c.outStandingRequestConutLimit
}
diff --git a/protocol/dubbo/client.go b/protocol/dubbo/client.go
index 6d1b771..54752ee 100644
--- a/protocol/dubbo/client.go
+++ b/protocol/dubbo/client.go
@@ -193,7 +193,7 @@ type Response struct {
atta map[string]string
}
-// NewResponse create a new Response.
+// NewResponse create a new Response.
func NewResponse(reply interface{}, atta map[string]string) *Response {
return &Response{
reply: reply,
diff --git a/protocol/grpc/server.go b/protocol/grpc/server.go
index 4017b65..2b7b1ad 100644
--- a/protocol/grpc/server.go
+++ b/protocol/grpc/server.go
@@ -69,7 +69,7 @@ func (s *Server) Start(url common.URL) {
panic(err)
}
- // if global trace instance was set , then server tracer instance can be get. If not , will return Nooptracer
+ // if global trace instance was set, then server tracer instance can be get. If not , will return Nooptracer
tracer := opentracing.GlobalTracer()
server := grpc.NewServer(
grpc.UnaryInterceptor(otgrpc.OpenTracingServerInterceptor(tracer)))
diff --git a/protocol/invocation/rpcinvocation.go b/protocol/invocation/rpcinvocation.go
index 953d50c..c72e105 100644
--- a/protocol/invocation/rpcinvocation.go
+++ b/protocol/invocation/rpcinvocation.go
@@ -27,7 +27,7 @@ import (
)
// ///////////////////////////
-// Invocation Impletment of RPC
+// Invocation Implement of RPC
// ///////////////////////////
// todo: is it necessary to separate fields of consumer(provider) from RPCInvocation
@@ -103,7 +103,7 @@ func (r *RPCInvocation) Attachments() map[string]string {
return r.attachments
}
-// AttachmentsByKey gets RPC attachment by key , if nil then return default value.
+// AttachmentsByKey gets RPC attachment by key, if nil then return default value.
func (r *RPCInvocation) AttachmentsByKey(key string, defaultValue string) string {
r.lock.RLock()
defer r.lock.RUnlock()
diff --git a/protocol/result.go b/protocol/result.go
index 2e7a6e4..2a33be6 100644
--- a/protocol/result.go
+++ b/protocol/result.go
@@ -38,7 +38,7 @@ type Result interface {
}
/////////////////////////////
-// Result Impletment of RPC
+// Result Implement of RPC
/////////////////////////////
// RPCResult is default RPC result.
diff --git a/registry/etcdv3/service_discovery.go b/registry/etcdv3/service_discovery.go
index f381ba7..dceaa99 100644
--- a/registry/etcdv3/service_discovery.go
+++ b/registry/etcdv3/service_discovery.go
@@ -71,7 +71,7 @@ func (e *etcdV3ServiceDiscovery) String() string {
return e.descriptor
}
-// Destory service discovery
+// Destroy service discovery
func (e *etcdV3ServiceDiscovery) Destroy() error {
if e.client != nil {
e.client.Close()
diff --git a/registry/nacos/listener.go b/registry/nacos/listener.go
index 36f733d..4282bf8 100644
--- a/registry/nacos/listener.go
+++ b/registry/nacos/listener.go
@@ -132,7 +132,7 @@ func (nl *nacosListener) Callback(services []model.SubscribeService, err error)
instance := generateInstance(services[i])
newInstanceMap[host] = instance
if old, ok := nl.instanceMap[host]; !ok {
- //instance is not exsit in cache,add it to cache
+ //instance is not exist in cache,add it to cache
addInstances = append(addInstances, instance)
} else {
//instance is not different from cache,update it to cache
@@ -144,7 +144,7 @@ func (nl *nacosListener) Callback(services []model.SubscribeService, err error)
for host, inst := range nl.instanceMap {
if _, ok := newInstanceMap[host]; !ok {
- //cache instance is not exsit in new instance list, remove it from cache
+ //cache instance is not exist in new instance list, remove it from cache
delInstances = append(delInstances, inst)
}
}
diff --git a/registry/registry.go b/registry/registry.go
index bb09ead..5e77eab 100644
--- a/registry/registry.go
+++ b/registry/registry.go
@@ -46,7 +46,7 @@ type Registry interface {
//Deprecated!
//subscribe(event.URL) (Listener, error)
- //Will relace mode1 in dubbogo version v1.1.0
+ //Will replace mode1 in dubbogo version v1.1.0
//mode2 : callback mode, subscribe with notify(notify listener).
Subscribe(*common.URL, NotifyListener) error
diff --git a/remoting/kubernetes/registry_controller.go b/remoting/kubernetes/registry_controller.go
index f93a00a..20be0d7 100644
--- a/remoting/kubernetes/registry_controller.go
+++ b/remoting/kubernetes/registry_controller.go
@@ -567,7 +567,7 @@ func (c *dubboRegistryController) addAnnotationForCurrentPod(k string, v string)
c.lock.Lock()
defer c.lock.Unlock()
- // 1. accord old pod && (k, v) assemble new pod dubbo annotion v
+ // 1. accord old pod && (k, v) assemble new pod dubbo annotation v
// 2. get patch data
// 3. PATCH the pod
currentPod, err := c.readCurrentPod()
diff --git a/remoting/zookeeper/client.go b/remoting/zookeeper/client.go
index 3db743e..fbd9076 100644
--- a/remoting/zookeeper/client.go
+++ b/remoting/zookeeper/client.go
@@ -190,7 +190,7 @@ func NewZookeeperClient(name string, zkAddrs []string, timeout time.Duration) (*
return z, nil
}
-// WithTestCluster sets test cluser for zk client
+// WithTestCluster sets test cluster for zk client
func WithTestCluster(ts *zk.TestCluster) Option {
return func(opt *Options) {
opt.ts = ts
[dubbo-go] 02/03: Format codes
Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
alexstocks pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git
commit 2791895b74e3c9f6e40f436d59a9162c9d24511a
Author: lihaowei <ha...@gmail.com>
AuthorDate: Sun Aug 9 11:02:32 2020 +0800
Format codes
---
registry/nacos/listener.go | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/registry/nacos/listener.go b/registry/nacos/listener.go
index 4282bf8..6699007 100644
--- a/registry/nacos/listener.go
+++ b/registry/nacos/listener.go
@@ -132,10 +132,10 @@ func (nl *nacosListener) Callback(services []model.SubscribeService, err error)
instance := generateInstance(services[i])
newInstanceMap[host] = instance
if old, ok := nl.instanceMap[host]; !ok {
- //instance is not exist in cache,add it to cache
+ // instance is not exist in cache, add it to cache
addInstances = append(addInstances, instance)
} else {
- //instance is not different from cache,update it to cache
+ // instance is not different from cache, update it to cache
if !reflect.DeepEqual(old, instance) {
updateInstances = append(updateInstances, instance)
}
@@ -144,7 +144,7 @@ func (nl *nacosListener) Callback(services []model.SubscribeService, err error)
for host, inst := range nl.instanceMap {
if _, ok := newInstanceMap[host]; !ok {
- //cache instance is not exist in new instance list, remove it from cache
+ // cache instance is not exist in new instance list, remove it from cache
delInstances = append(delInstances, inst)
}
}