Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use class name as the default reference name #1339

Merged
merged 24 commits into from
Aug 9, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
518be2b
build(deps): bump actions/cache from v2.1.4 to v2.1.5
dependabot[bot] Apr 19, 2021
3162e41
Merge pull request #1162 from apache/dependabot/github_actions/develo…
AlexStocks Apr 21, 2021
2138190
Merge branch 'develop' of https://github.com/apache/dubbo-go into dev…
AlexStocks Apr 27, 2021
bef8e95
Merge branch '3.0' into develop
AlexStocks Apr 27, 2021
a85b65b
Merge branch '3.0' into develop
AlexStocks May 9, 2021
9e38afe
Merge branch '3.0' into develop
AlexStocks May 10, 2021
f0ad730
Merge branch '3.0' into develop
AlexStocks May 10, 2021
4cb6e44
improve etcd version and change create to put (#1203)
ztelur May 15, 2021
56d9d71
Merge branch '3.0' into develop
AlexStocks May 15, 2021
cc74aa5
Merge branch '3.0' into develop
AlexStocks May 18, 2021
40082d4
Merge branch '3.0' into develop
AlexStocks May 21, 2021
63c7c59
Merge pull request #2 from apache/master
alchemy-lee Jun 3, 2021
421ad54
Merge pull request #3 from apache/3.0
alchemy-lee Jun 3, 2021
7b0682f
Merge pull request #4 from apache/3.0
alchemy-lee Jul 23, 2021
e73e49b
Remove RPC Service
alchemy-lee Jul 23, 2021
047402e
use type assertion before reflect
alchemy-lee Jul 26, 2021
fb68862
modify comment
alchemy-lee Jul 26, 2021
99ec546
Merge pull request #5 from apache/3.0
alchemy-lee Jul 26, 2021
df0e23e
modify comment of BaseMetadataService
alchemy-lee Jul 28, 2021
0c966ad
Merge remote-tracking branch 'origin/rm-rpc' into rm-rpc
alchemy-lee Jul 28, 2021
3d85e2b
add the type alias of interface{}
alchemy-lee Jul 30, 2021
e441a84
Merge pull request #6 from apache/3.0
alchemy-lee Jul 30, 2021
97f25a9
modify RPCService
alchemy-lee Aug 2, 2021
a2f1a2f
Merge remote-tracking branch 'origin/rm-rpc' into rm-rpc
alchemy-lee Aug 2, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
improve etcd version and change create to put (#1203)
  • Loading branch information
ztelur authored May 15, 2021
commit 4cb6e4401b788d1088058cc7ca2d9bb205d2d261
8 changes: 5 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
github.com/creasty/defaults v1.5.1
github.com/docker/go-connections v0.4.0 // indirect
github.com/dubbogo/go-zookeeper v1.0.3
github.com/dubbogo/gost v1.11.8
github.com/dubbogo/gost v1.11.9
github.com/dubbogo/triple v1.0.0
github.com/elazarl/go-bindata-assetfs v1.0.0 // indirect
github.com/emicklei/go-restful/v3 v3.4.0
Expand Down Expand Up @@ -51,10 +51,12 @@ require (
github.com/stretchr/objx v0.2.0 // indirect
github.com/stretchr/testify v1.7.0
github.com/zouyx/agollo/v3 v3.4.5
go.etcd.io/etcd v0.0.0-20200402134248-51bdeb39e698
go.etcd.io/etcd/api/v3 v3.5.0-alpha.0
go.etcd.io/etcd/client/v3 v3.5.0-alpha.0
go.etcd.io/etcd/server/v3 v3.5.0-alpha.0
go.uber.org/atomic v1.7.0
go.uber.org/zap v1.16.0
google.golang.org/grpc v1.33.1
google.golang.org/grpc v1.36.0
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.16.9
k8s.io/apimachinery v0.16.9
Expand Down
70 changes: 57 additions & 13 deletions go.sum

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions metadata/report/etcd/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,21 @@ func (e *etcdMetadataReport) PublishAppMetadata(metadataIdentifier *identifier.S
// metadata including the basic info of the server, provider info, and other user custom info
func (e *etcdMetadataReport) StoreProviderMetadata(providerIdentifier *identifier.MetadataIdentifier, serviceDefinitions string) error {
key := e.getNodeKey(providerIdentifier)
return e.client.Create(key, serviceDefinitions)
return e.client.Put(key, serviceDefinitions)
}

// StoreConsumerMetadata will store the metadata
// metadata including the basic info of the server, consumer info, and other user custom info
func (e *etcdMetadataReport) StoreConsumerMetadata(consumerMetadataIdentifier *identifier.MetadataIdentifier, serviceParameterString string) error {
key := e.getNodeKey(consumerMetadataIdentifier)
return e.client.Create(key, serviceParameterString)
return e.client.Put(key, serviceParameterString)
}

// SaveServiceMetadata will store the metadata
// metadata including the basic info of the server, service info, and other user custom info
func (e *etcdMetadataReport) SaveServiceMetadata(metadataIdentifier *identifier.ServiceMetadataIdentifier, url *common.URL) error {
key := e.getNodeKey(metadataIdentifier)
return e.client.Create(key, url.String())
return e.client.Put(key, url.String())
}

// RemoveServiceMetadata will remove the service metadata
Expand All @@ -105,7 +105,7 @@ func (e *etcdMetadataReport) GetExportedURLs(metadataIdentifier *identifier.Serv
// SaveSubscribedData will convert the urlList to json array and then store it
func (e *etcdMetadataReport) SaveSubscribedData(subscriberMetadataIdentifier *identifier.SubscriberMetadataIdentifier, urls string) error {
key := e.getNodeKey(subscriberMetadataIdentifier)
return e.client.Create(key, urls)
return e.client.Put(key, urls)
}

// GetSubscribedURLs will lookup the url
Expand Down
2 changes: 1 addition & 1 deletion metadata/report/etcd/report_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (

import (
"github.com/stretchr/testify/assert"
"go.etcd.io/etcd/embed"
"go.etcd.io/etcd/server/v3/embed"
)

import (
Expand Down
2 changes: 1 addition & 1 deletion registry/etcdv3/listener_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
import (
"github.com/apache/dubbo-getty"
"github.com/stretchr/testify/suite"
"go.etcd.io/etcd/embed"
"go.etcd.io/etcd/server/v3/embed"
)

import (
Expand Down
2 changes: 1 addition & 1 deletion registry/etcdv3/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func (r *etcdV3Registry) CreatePath(k string) error {
var tmpPath string
for _, str := range strings.Split(k, "/")[1:] {
tmpPath = path.Join(tmpPath, "/", str)
if err := r.client.Create(tmpPath, ""); err != nil {
if err := r.client.Put(tmpPath, ""); err != nil {
return perrors.WithMessagef(err, "create path %s in etcd", tmpPath)
}
}
Expand Down
4 changes: 2 additions & 2 deletions remoting/etcdv3/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
import (
gxetcd "github.com/dubbogo/gost/database/kv/etcd/v3"
perrors "github.com/pkg/errors"
"go.etcd.io/etcd/clientv3"
"go.etcd.io/etcd/mvcc/mvccpb"
"go.etcd.io/etcd/api/v3/mvccpb"
clientv3 "go.etcd.io/etcd/client/v3"
)

import (
Expand Down
2 changes: 1 addition & 1 deletion remoting/etcdv3/listener_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
import (
gxetcd "github.com/dubbogo/gost/database/kv/etcd/v3"
"github.com/stretchr/testify/assert"
"go.etcd.io/etcd/embed"
"go.etcd.io/etcd/server/v3/embed"
)

import (
Expand Down