Skip to content
Snippets Groups Projects
Unverified Commit c86547f6 authored by Baster's avatar Baster Committed by GitHub
Browse files

Merge branch 'develop' into fix_zk_reconnect_issue

parents 89f8ac86 91304664
No related branches found
No related tags found
No related merge requests found
Showing
with 210 additions and 110 deletions
......@@ -54,13 +54,24 @@ jobs:
go get -v -t -d ./...
fi
- name: gofmt
run: |
go fmt ./... && git checkout -- go.mod && git status && [[ -z `git status -s` ]]
# diff -u <(echo -n) <(gofmt -d -s .)
- name: Install go ci lint
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.27.0
- name: Run Linter
run: golangci-lint run --timeout=10m -v
- name: Verify
run: |
make verify
- name: Integrate Test
run: |
chmod +x integrate_test.sh && ./integrate_test.sh
chmod +x integrate_test.sh && ./integrate_test.sh ${{github.event.pull_request.head.repo.full_name}} ${{github.event.pull_request.head.sha}}
- name: Post Coverage
run: bash <(curl -s https://codecov.io/bash)
......
linters-settings:
govet:
check-shadowing: true
golint:
min-confidence: 0
gocyclo:
min-complexity: 10
maligned:
suggest-new: true
dupl:
threshold: 100
goconst:
min-len: 2
min-occurrences: 2
depguard:
list-type: blacklist
packages:
# logging is allowed only by logutils.Log, logrus
# is allowed to use only in logutils package
- github.com/sirupsen/logrus
misspell:
locale: US
lll:
line-length: 140
goimports:
local-prefixes: github.com/golangci/golangci-lint
gocritic:
enabled-tags:
- performance
- style
- experimental
disabled-checks:
- wrapperFunc
linters:
disable-all: true
enable:
- govet
- staticcheck
- ineffassign
- misspell
run:
skip-dirs:
- test/testdata_etc
- pkg/golinters/goanalysis/(checker|passes)
issues:
exclude-rules:
- text: "weak cryptographic primitive"
linters:
- gosec
- linters:
- staticcheck
text: "SA1019:"
# golangci.com configuration
# https://github.com/golangci/golangci/wiki/Configuration
service:
golangci-lint-version: 1.15.x # use the fixed version to not introduce new linters unexpectedly
prepare:
- echo "here I can run custom commands, but no preparation needed for this repo"
dist: trusty
sudo: required
# define the dependence env
language: go
os:
- linux
go:
- "1.13"
services:
- docker
env:
- GO111MODULE=on
install: true
# define ci-stage
script:
- go fmt ./... && [[ -z `git status -s` ]]
# license-check
- make verify
# integrate-test
- chmod +x integrate_test.sh && ./integrate_test.sh
after_success:
- bash <(curl -s https://codecov.io/bash)
notifications:
webhooks: https://oapi.dingtalk.com/robot/send?access_token=f5d6237f2c79db584e75604f7f88db1ce1673c8c0e98451217b28fde791e1d4f
Apache Dubbo-go
Copyright 2018-2020 The Apache Software Foundation
Copyright 2018-2021 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
......@@ -7,6 +7,7 @@
![license](https://img.shields.io/badge/license-Apache--2.0-green.svg)
---
Apache Dubbo Go Implementation.
......@@ -16,14 +17,14 @@ Apache License, Version 2.0
## Release note ##
[v1.5.5 - Jan 5, 2021](https://github.com/apache/dubbo-go/releases/tag/v1.5.5)
[v1.4.5 - Nov 18, 2020](https://github.com/apache/dubbo-go/releases/tag/v1.4.5)
[v1.5.4 - Nov 1, 2020](https://github.com/apache/dubbo-go/releases/tag/v1.5.4)
[v1.5.3 - Sep 23, 2020](https://github.com/apache/dubbo-go/releases/tag/v1.5.3)
[v1.5.2 - discard]()
[v1.5.1 - Aug 23, 2020](https://github.com/apache/dubbo-go/releases/tag/v1.5.1)
[v1.5.0 - July 24, 2020](https://github.com/apache/dubbo-go/releases/tag/v1.5.0)
......@@ -134,25 +135,17 @@ Finished List:
* [Zookeeper](https://github.com/apache/dubbo-go/blob/9a5990d9a9c3d5e6633c0d7d926c156416bcb931/registry/zookeeper/service_discovery.go)
* [Etcd](https://github.com/apache/dubbo-go/blob/9a5990d9a9c3d5e6633c0d7d926c156416bcb931/registry/etcdv3/service_discovery.go)
- Others:
* start check
* connecting certain provider
* multi-protocols
* multi-registries
* multi-versions
* service group
You can know more about dubbo-go by its [roadmap](https://github.com/apache/dubbo-go/wiki/Roadmap).
![feature](./doc/pic/arch/dubbo-go-arch.png)
## Document
https://dubbogo.github.io/dubbo-go-website (**Improving**)
[dubbo-doc](http://dubbo.apache.org/zh/blog/) or [dubbo-go-doc-list](http://alexstocks.github.io/html/dubbogo.html)
## Quick Start
[dubbo-go-samples](https://github.com/apache/dubbo-go-samples) shows how to use dubbo-go. Please read the [dubbo-samples/golang/README.md](https://github.com/apache/dubbo-go-samples/blob/master/README.md) carefully to learn how to dispose the configuration and compile the program.
[dubbo-go-samples](https://github.com/apache/dubbo-go-samples) gives many examples to tell u how to use dubbo-go. Please read the [dubbo-samples/golang/README.md](https://github.com/apache/dubbo-go-samples/blob/master/README.md) carefully to learn how to dispose the configuration and compile the program.
## Running unit tests
......@@ -182,6 +175,17 @@ Please move to [dubbo-samples/golang](https://github.com/dubbogo/dubbo-samples)
If you are willing to do some code contributions and document contributions to [Apache/dubbo-go](https://github.com/apache/dubbo-go), please visit [contribution intro](https://github.com/apache/dubbo-go/blob/master/contributing.md).
## Community
If u want to communicate with our community, pls scan the following [dubbobo Ding-Ding QR code](https://mmbiz.qpic.cn/mmbiz_jpg/yvBJb5IiafvnHVBdtia30dxA2hKotr9DEckWsZ7aOJcDWDaSVMGwLmYv8GRgIQtqb4C2svicp8nVkMmGy7yKC5tyA/640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1) or search our commnity DingDing group code 31363295.
<a href="http://alexstocks.github.io/html/dubbogo.html">
<img src="./doc/pic/misc/dubbogo-dingding.png" height="80" width="80"></a>
If u want to visit the wechat group, pls add my wechat AlexanderStocks.
We welcome the friends who can give us constructing suggestions instead of known-nothing.
## Benchmark
Benchmark project [dubbo-go-benchmark](https://github.com/dubbogo/dubbo-go-benchmark).
......@@ -259,8 +263,13 @@ If you are using [apache/dubbo-go](github.com/apache/dubbo-go) and think that it
<img width="222px" src="https://ugc.hitv.com/platform_oss/F6077F1AA82542CDBDD88FD518E6E727.png">
</a>
</td>
<td align="center" valign="middle">
<a href="http://www.dmall.com" target="_blank">
<img width="222px" src="https://mosn.io/images/community/duodian.png">
</a>
</td>
</tr>
<tr></tr>
<tr></tr>
</tbody>
</table>
</div>
......@@ -15,14 +15,14 @@ Apache License, Version 2.0
## 发布日志 ##
[v1.5.5 - 2021年1月5日](https://github.com/apache/dubbo-go/releases/tag/v1.5.5)
[v1.4.5 - 2020年11月18日](https://github.com/apache/dubbo-go/releases/tag/v1.4.5)
[v1.5.4 - 2020年11月1日](https://github.com/apache/dubbo-go/releases/tag/v1.5.4)
[v1.5.3 - 2020年9月23日](https://github.com/apache/dubbo-go/releases/tag/v1.5.3)
[v1.5.2 - 舍弃]()
[v1.5.1 - 2020年8月23日](https://github.com/apache/dubbo-go/releases/tag/v1.5.1)
[v1.5.0 - 2020年7月24日](https://github.com/apache/dubbo-go/releases/tag/v1.5.0)
......@@ -67,11 +67,11 @@ Apache License, Version 2.0
* Jsonrpc2.0
* [gRPC](https://github.com/apache/dubbo-go/pull/311)
* [RESTful](https://github.com/apache/dubbo-go/pull/352)
- 路由器
* [Condition router](https://github.com/apache/dubbo-go/pull/294)
* [Health check router](https://github.com/apache/dubbo-go/pull/389)
- 注册中心
* ZooKeeper
* [etcd v3](https://github.com/apache/dubbo-go/pull/148)
......@@ -112,7 +112,7 @@ Apache License, Version 2.0
- 调用
* [泛化调用](https://github.com/apache/dubbo-go/pull/122)
- 监控
* Opentracing API
* [Prometheus](https://github.com/apache/dubbo-go/pull/342)
......@@ -133,25 +133,17 @@ Apache License, Version 2.0
* [Zookeeper](https://github.com/apache/dubbo-go/blob/9a5990d9a9c3d5e6633c0d7d926c156416bcb931/registry/zookeeper/service_discovery.go)
* [Etcd](https://github.com/apache/dubbo-go/blob/9a5990d9a9c3d5e6633c0d7d926c156416bcb931/registry/etcdv3/service_discovery.go)
- 其他功能支持:
* 启动时检查
* 服务直连
* 多服务协议
* 多注册中心
* 多服务版本
* 服务分组
你可以通过访问 [roadmap](https://github.com/apache/dubbo-go/wiki/Roadmap) 知道更多关于 dubbo-go 的信息。
![feature](./doc/pic/arch/dubbo-go-arch.png)
## 文档
https://dubbogo.github.io/dubbo-go-website (**完善中**)
请访问 [dubbo官方文档中关于 dubbo-go 的系列文档](http://dubbo.apache.org/zh/blog/)[过往dubbo-go文档列表](http://alexstocks.github.io/html/dubbogo.html)
## 快速开始 ##
[dubbo-samples/golang](https://github.com/dubbogo/dubbo-samples)这个项目的事例展示了如何使用 dubbo-go 。请仔细阅读 [dubbo-samples/golang/README.md](https://github.com/dubbogo/dubbo-samples/blob/master/golang/README.md) 学习如何处理配置并编译程序。
[dubbo-samples/golang](https://github.com/apache/dubbo-go-samples)这个项目的事例展示了如何使用 dubbo-go 。请仔细阅读 [dubbo-samples/golang/README.md](https://github.com/apache/dubbo-go-samples/blob/master/README.md) 学习如何处理配置并编译程序。
## 运行单测
......@@ -181,6 +173,17 @@ make test
如果您愿意给 [Apache/dubbo-go](https://github.com/apache/dubbo-go) 贡献代码或者文档,我们都热烈欢迎。具体请参考 [contribution intro](https://github.com/apache/dubbo-go/blob/master/contributing.md)
## 社区
如果想访问官方钉钉群,请在钉钉中搜索社区群号 31363295 或者 扫描如下[二维码](https://mmbiz.qpic.cn/mmbiz_jpg/yvBJb5IiafvnHVBdtia30dxA2hKotr9DEckWsZ7aOJcDWDaSVMGwLmYv8GRgIQtqb4C2svicp8nVkMmGy7yKC5tyA/640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1)
<a href="http://alexstocks.github.io/html/dubbogo.html">
<img src="./doc/pic/misc/dubbogo-dingding.png" height="80" width="80"></a>
如果想加入到社区微信群,可以先添加社区负责人 于雨 的微信 AlexanderStocks 。添加微信之前,请先给 dubbo-go 点 star 作为对项目的支持,添加好友时请报上 github ID 以进行验证。
作为一个维护已经帮助构建了经受多家大型微服务系统的社区,我们足以为现有的成绩感到自豪。社区欢迎能提出建设性意见者,只知索取者和喷子请绕行。
## 性能测试 ##
性能测试项目是 [dubbo-go-benchmark](https://github.com/dubbogo/dubbo-go-benchmark)
......@@ -256,9 +259,14 @@ make test
<a href="http://www.mgtv.com" target="_blank">
<img width="222px" src="https://ugc.hitv.com/platform_oss/F6077F1AA82542CDBDD88FD518E6E727.png">
</a>
</td>
<td align="center" valign="middle">
<a href="http://www.dmall.com" target="_blank">
<img width="222px" src="https://mosn.io/images/community/duodian.png">
</a>
</td>
</tr>
<tr></tr>
<tr></tr>
</tbody>
</table>
</div>
\ No newline at end of file
</div>
......@@ -39,6 +39,6 @@ func NewAvailableCluster() cluster.Cluster {
}
// Join returns a baseClusterInvoker instance
func (cluser *availableCluster) Join(directory cluster.Directory) protocol.Invoker {
func (cluster *availableCluster) Join(directory cluster.Directory) protocol.Invoker {
return NewAvailableClusterInvoker(directory)
}
......@@ -77,8 +77,7 @@ func (invoker *failbackClusterInvoker) tryTimerTaskProc(ctx context.Context, ret
invoked = append(invoked, retryTask.lastInvoker)
retryInvoker := invoker.doSelect(retryTask.loadbalance, retryTask.invocation, retryTask.invokers, invoked)
var result protocol.Result
result = retryInvoker.Invoke(ctx, retryTask.invocation)
result := retryInvoker.Invoke(ctx, retryTask.invocation)
if result.Error() != nil {
retryTask.lastInvoker = retryInvoker
invoker.checkRetry(retryTask, result.Error())
......@@ -121,8 +120,11 @@ func (invoker *failbackClusterInvoker) checkRetry(retryTask *retryTimerTask, err
if retryTask.retries > invoker.maxRetries {
logger.Errorf("Failed retry times exceed threshold (%v), We have to abandon, invocation-> %v.\n",
retryTask.retries, retryTask.invocation)
} else {
invoker.taskList.Put(retryTask)
return
}
if err := invoker.taskList.Put(retryTask); err != nil {
logger.Errorf("invoker.taskList.Put(retryTask:%#v) = error:%v", retryTask, err)
}
}
......
......@@ -195,7 +195,7 @@ func (c *RouterChain) copyInvokerIfNecessary(cache *InvokerCache) []protocol.Inv
func (c *RouterChain) buildCache() {
origin := c.loadCache()
invokers := c.copyInvokerIfNecessary(origin)
if invokers == nil || len(invokers) == 0 {
if len(invokers) == 0 {
return
}
......
......@@ -76,8 +76,10 @@ conditions:
_, err = z.Conn.Set(path, []byte(testyml), 0)
assert.NoError(t, err)
defer ts.Stop()
defer z.Close()
defer func() {
_ = ts.Stop()
z.Close()
}()
zkUrl, _ := common.NewURL(fmt.Sprintf(zkFormat, localIP, ts.Servers[0].Port))
configuration, err := extension.GetConfigCenterFactory(zk).GetDynamicConfiguration(zkUrl)
......@@ -128,11 +130,15 @@ conditions:
_, err = z.Conn.Set(path, []byte(testyml), 0)
assert.NoError(t, err)
defer ts.Stop()
defer z.Close()
defer func() {
_ = ts.Stop()
assert.NoError(t, err)
z.Close()
}()
zkUrl, _ := common.NewURL(fmt.Sprintf(zkFormat, localIP, ts.Servers[0].Port))
configuration, err := extension.GetConfigCenterFactory(zk).GetDynamicConfiguration(zkUrl)
assert.NoError(t, err)
config.GetEnvInstance().SetDynamicConfiguration(configuration)
chain, err := NewRouterChain(getConditionRouteUrl(applicationKey))
......@@ -154,11 +160,15 @@ conditions:
func TestRouterChainRoute(t *testing.T) {
ts, z, _, err := zookeeper.NewMockZookeeperClient("test", 15*time.Second)
defer ts.Stop()
defer z.Close()
defer func() {
err = ts.Stop()
assert.NoError(t, err)
z.Close()
}()
zkUrl, _ := common.NewURL(fmt.Sprintf(zkFormat, localIP, ts.Servers[0].Port))
configuration, err := extension.GetConfigCenterFactory(zk).GetDynamicConfiguration(zkUrl)
assert.NoError(t, err)
config.GetEnvInstance().SetDynamicConfiguration(configuration)
chain, err := NewRouterChain(getConditionRouteUrl(applicationKey))
......@@ -198,11 +208,15 @@ conditions:
_, err = z.Conn.Set(path, []byte(testyml), 0)
assert.NoError(t, err)
defer ts.Stop()
defer z.Close()
defer func() {
_ = ts.Stop()
assert.NoError(t, err)
z.Close()
}()
zkUrl, _ := common.NewURL(fmt.Sprintf(zkFormat, localIP, ts.Servers[0].Port))
configuration, err := extension.GetConfigCenterFactory(zk).GetDynamicConfiguration(zkUrl)
assert.NoError(t, err)
config.GetEnvInstance().SetDynamicConfiguration(configuration)
chain, err := NewRouterChain(getConditionRouteUrl(applicationKey))
......@@ -224,12 +238,17 @@ conditions:
func TestRouterChainRouteNoRoute(t *testing.T) {
ts, z, _, err := zookeeper.NewMockZookeeperClient("test", 15*time.Second)
defer ts.Stop()
defer z.Close()
assert.Nil(t, err)
defer func() {
_ = ts.Stop()
assert.NoError(t, err)
z.Close()
}()
zkUrl, _ := common.NewURL(fmt.Sprintf(zkFormat, localIP, ts.Servers[0].Port))
configuration, err := extension.GetConfigCenterFactory(zk).GetDynamicConfiguration(zkUrl)
config.GetEnvInstance().SetDynamicConfiguration(configuration)
assert.Nil(t, err)
chain, err := NewRouterChain(getConditionNoRouteUrl(applicationKey))
assert.Nil(t, err)
......
......@@ -67,8 +67,11 @@ conditions:
_, err = z.Conn.Set(routerPath, []byte(testYML), 0)
assert.NoError(t, err)
defer ts.Stop()
defer z.Close()
defer func() {
err = ts.Stop()
assert.NoError(t, err)
z.Close()
}()
zkUrl, _ := common.NewURL(fmt.Sprintf(zkFormat, routerLocalIP, ts.Servers[0].Port))
configuration, err := extension.GetConfigCenterFactory(routerZk).GetDynamicConfiguration(zkUrl)
......@@ -115,8 +118,11 @@ conditions:
_, err = z.Conn.Set(routerPath, []byte(testYML), 0)
assert.NoError(t, err)
defer ts.Stop()
defer z.Close()
defer func() {
err = ts.Stop()
assert.NoError(t, err)
z.Close()
}()
zkUrl, _ := common.NewURL(fmt.Sprintf(zkFormat, routerLocalIP, ts.Servers[0].Port))
configuration, err := extension.GetConfigCenterFactory(routerZk).GetDynamicConfiguration(zkUrl)
......@@ -154,8 +160,11 @@ conditions:
_, err = z.Conn.Set(routerPath, []byte(testYML), 0)
assert.NoError(t, err)
defer ts.Stop()
defer z.Close()
defer func() {
err = ts.Stop()
assert.NoError(t, err)
z.Close()
}()
zkUrl, _ := common.NewURL(fmt.Sprintf(zkFormat, routerLocalIP, ts.Servers[0].Port))
configuration, err := extension.GetConfigCenterFactory(routerZk).GetDynamicConfiguration(zkUrl)
......
......@@ -89,30 +89,35 @@ func TestParseServiceRouterKey(t *testing.T) {
assert.Equal(t, "mock-group", grp)
assert.Equal(t, "mock-service", srv)
assert.Equal(t, "1.0.0", ver)
assert.Nil(t, err)
testString = "mock-group/mock-service"
grp, srv, ver, err = parseServiceRouterKey(testString)
assert.Equal(t, "mock-group", grp)
assert.Equal(t, "mock-service", srv)
assert.Equal(t, "", ver)
assert.Nil(t, err)
testString = "mock-service:1.0.0"
grp, srv, ver, err = parseServiceRouterKey(testString)
assert.Equal(t, "", grp)
assert.Equal(t, "mock-service", srv)
assert.Equal(t, "1.0.0", ver)
assert.Nil(t, err)
testString = "mock-service"
grp, srv, ver, err = parseServiceRouterKey(testString)
assert.Equal(t, "", grp)
assert.Equal(t, "mock-service", srv)
assert.Equal(t, "", ver)
assert.NoError(t, err)
testString = "/mock-service:"
grp, srv, ver, err = parseServiceRouterKey(testString)
assert.Equal(t, "", grp)
assert.Equal(t, "mock-service", srv)
assert.Equal(t, "", ver)
assert.NoError(t, err)
testString = "grp:mock-service:123"
grp, srv, ver, err = parseServiceRouterKey(testString)
......@@ -126,4 +131,5 @@ func TestParseServiceRouterKey(t *testing.T) {
assert.Equal(t, "", grp)
assert.Equal(t, "", srv)
assert.Equal(t, "", ver)
assert.NoError(t, err)
}
......@@ -47,8 +47,8 @@ type listenableRouter struct {
conditionRouters []*ConditionRouter
routerRule *RouterRule
url *common.URL
force bool
priority int64
//force bool
priority int64
}
// RouterRule Get RouterRule instance from listenableRouter
......
......@@ -41,7 +41,7 @@ type FileTagRouter struct {
router *tagRouter
routerRule *RouterRule
url *common.URL
force bool
//force bool
}
// NewFileTagRouter Create file tag router instance with content (from config file)
......
......@@ -84,9 +84,9 @@ func (t *RouterRule) getTagNames() []string {
return result
}
func (t *RouterRule) hasTag(tag string) bool {
return len(t.TagNameToAddresses[tag]) > 0
}
//func (t *RouterRule) hasTag(tag string) bool {
// return len(t.TagNameToAddresses[tag]) > 0
//}
func (t *RouterRule) getAddressToTagNames() map[string][]string {
return t.AddressToTagNames
......@@ -96,10 +96,10 @@ func (t *RouterRule) getTagNameToAddresses() map[string][]string {
return t.TagNameToAddresses
}
func (t *RouterRule) getTags() []Tag {
return t.Tags
}
//func (t *RouterRule) getTags() []Tag {
// return t.Tags
//}
func (t *RouterRule) setTags(tags []Tag) {
t.Tags = tags
}
//func (t *RouterRule) setTags(tags []Tag) {
// t.Tags = tags
//}
......@@ -53,7 +53,7 @@ type addrMetadata struct {
// application name
application string
// is rule a runtime rule
ruleRuntime bool
//ruleRuntime bool
// is rule a force rule
ruleForce bool
// is rule a valid rule
......@@ -227,7 +227,7 @@ func (c *tagRouter) Pool(invokers []protocol.Invoker) (router.AddrPool, router.A
// fetchRuleIfNecessary fetches, parses rule and register listener for the further change
func (c *tagRouter) fetchRuleIfNecessary(invokers []protocol.Invoker) {
if invokers == nil || len(invokers) == 0 {
if len(invokers) == 0 {
return
}
......
......@@ -73,8 +73,7 @@ const (
)
var (
zkFormat = "zookeeper://%s:%d"
conditionFormat = "condition://%s/com.foo.BarService"
zkFormat = "zookeeper://%s:%d"
)
// MockInvoker is only mock the Invoker to support test tagRouter
......@@ -238,7 +237,7 @@ func TestRouteBeijingInvoker(t *testing.T) {
type DynamicTagRouter struct {
suite.Suite
rule *RouterRule
//rule *RouterRule
route *tagRouter
zkClient *zookeeper.ZookeeperClient
......@@ -310,7 +309,8 @@ tags:
func (suite *DynamicTagRouter) TearDownTest() {
suite.zkClient.Close()
suite.testCluster.Stop()
err := suite.testCluster.Stop()
suite.Nil(err)
}
func (suite *DynamicTagRouter) TestDynamicTagRouterSetByIPv4() {
......
......@@ -34,8 +34,8 @@ import (
// We just have config center configuration which can override configuration in consumer.yaml & provider.yaml.
// But for add these features in future ,I finish the environment struct following Environment class in java.
type Environment struct {
configCenterFirst bool
externalConfigs sync.Map
configCenterFirst bool
//externalConfigs sync.Map
externalConfigMap sync.Map
appExternalConfigMap sync.Map
dynamicConfiguration config_center.DynamicConfiguration
......
......@@ -81,7 +81,7 @@ const (
const (
SIMPLE_METADATA_SERVICE_NAME = "MetadataService"
DEFAULT_REVIESION = "N/A"
DEFAULT_REVISION = "N/A"
)
const (
......
......@@ -17,6 +17,8 @@
package constant
type DubboCtxKey string
const (
ASYNC_KEY = "async" // it's value should be "true" or "false" of string type
)
......@@ -47,8 +49,8 @@ const (
PORT_KEY = "port"
PROTOCOL_KEY = "protocol"
PATH_SEPARATOR = "/"
DUBBO_KEY = "dubbo"
SSL_ENABLED_KEY = "ssl-enabled"
//DUBBO_KEY = "dubbo"
SSL_ENABLED_KEY = "ssl-enabled"
)
const (
......@@ -92,7 +94,7 @@ const (
)
const (
DUBBOGO_CTX_KEY = "dubbogo-ctx"
DUBBOGO_CTX_KEY = DubboCtxKey("dubbogo-ctx")
)
const (
......@@ -171,6 +173,7 @@ const (
NACOS_NAMESPACE_ID = "namespaceId"
NACOS_PASSWORD = "password"
NACOS_USERNAME = "username"
NACOS_NOT_LOAD_LOCAL_CACHE = "nacos.not.load.cache"
)
const (
......@@ -198,11 +201,9 @@ const (
)
const (
TRACING_REMOTE_SPAN_CTX = "tracing.remote.span.ctx"
TRACING_REMOTE_SPAN_CTX = DubboCtxKey("tracing.remote.span.ctx")
)
type AttachmentCtxKey string
// Use for router module
const (
// ConditionRouterName Specify file condition router name
......@@ -240,7 +241,7 @@ const (
Tagkey = "dubbo.tag"
// Attachment key in context in invoker
AttachmentKey = AttachmentCtxKey("attachment")
AttachmentKey = DubboCtxKey("attachment")
)
const (
......
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