This is an automated email from the ASF dual-hosted git repository.
Alanxtl pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git
The following commit(s) were added to refs/heads/develop by this push:
new 5774b3d4e fix(metadata): preserve application tag in metadata info
(#3400)
5774b3d4e is described below
commit 5774b3d4e52bf0a0ff70e9315ce5bd91d00debd4
Author: Aether <[email protected]>
AuthorDate: Fri Jun 12 11:26:40 2026 +0800
fix(metadata): preserve application tag in metadata info (#3400)
---
metadata/client.go | 1 +
metadata/client_test.go | 21 ++++
metadata/info/metadata_info.go | 9 +-
metadata/info/metadata_info_test.go | 15 +++
metadata/metadata_service.go | 1 +
metadata/metadata_service_test.go | 29 ++++++
metadata/report/zookeeper/report_test.go | 2 +
.../triple_api/proto/metadata_service_v2.pb.go | 107 +++++++++++----------
.../triple_api/proto/metadata_service_v2.proto | 1 +
9 files changed, 132 insertions(+), 54 deletions(-)
diff --git a/metadata/client.go b/metadata/client.go
index f6b1ffd33..e3f09aa5d 100644
--- a/metadata/client.go
+++ b/metadata/client.go
@@ -108,6 +108,7 @@ func convertMetadataInfoV2(v2 *tripleapi.MetadataInfoV2)
*info.MetadataInfo {
metadataInfo := &info.MetadataInfo{
App: v2.App,
Revision: v2.Version,
+ Tag: v2.Tag,
Services: infos,
}
return metadataInfo
diff --git a/metadata/client_test.go b/metadata/client_test.go
index e5de35c97..aa538a918 100644
--- a/metadata/client_test.go
+++ b/metadata/client_test.go
@@ -36,6 +36,7 @@ import (
"dubbo.apache.org/dubbo-go/v3/common/extension"
"dubbo.apache.org/dubbo-go/v3/metadata/info"
"dubbo.apache.org/dubbo-go/v3/metadata/report"
+ tripleapi "dubbo.apache.org/dubbo-go/v3/metadata/triple_api/proto"
"dubbo.apache.org/dubbo-go/v3/protocol/base"
"dubbo.apache.org/dubbo-go/v3/protocol/result"
_ "dubbo.apache.org/dubbo-go/v3/proxy/proxy_factory"
@@ -62,6 +63,26 @@ var (
}
)
+func TestConvertMetadataInfoV2PreservesTag(t *testing.T) {
+ got := convertMetadataInfoV2(&tripleapi.MetadataInfoV2{
+ App: "dubbo-app",
+ Version: "revision",
+ Tag: "gray",
+ Services: map[string]*tripleapi.ServiceInfoV2{
+ "DemoService:tri": {
+ Name: "DemoService",
+ Protocol: "tri",
+ },
+ },
+ })
+
+ require.NotNil(t, got)
+ assert.Equal(t, "dubbo-app", got.App)
+ assert.Equal(t, "revision", got.Revision)
+ assert.Equal(t, "gray", got.Tag)
+ assert.Contains(t, got.Services, "DemoService:tri")
+}
+
func TestGetMetadataFromMetadataReport(t *testing.T) {
t.Cleanup(func() { instances = make(map[string]report.MetadataReport) })
diff --git a/metadata/info/metadata_info.go b/metadata/info/metadata_info.go
index 4caed3bfe..171438999 100644
--- a/metadata/info/metadata_info.go
+++ b/metadata/info/metadata_info.go
@@ -59,9 +59,9 @@ var IncludeKeys = gxset.NewSet(
// MetadataInfo the metadata information of instance
type MetadataInfo struct {
- App string `json:"app,omitempty" hessian:"app"`
- Revision string `json:"revision,omitempty"
hessian:"revision"`
- Tag string
+ App string `json:"app,omitempty"
hessian:"app"`
+ Revision string
`json:"revision,omitempty" hessian:"revision"`
+ Tag string `json:"tag,omitempty"
hessian:"tag"`
Services map[string]*ServiceInfo
`json:"services,omitempty" hessian:"services"`
exportedServiceURLs map[string][]*common.URL `hessian:"-"` // server
exported service urls
subscribedServiceURLs map[string][]*common.URL `hessian:"-"` // client
subscribed service urls
@@ -103,6 +103,9 @@ func (info *MetadataInfo) AddService(url *common.URL) {
if info.App == "" {
info.App = url.GetParam(constant.ApplicationKey, "")
}
+ if info.Tag == "" {
+ info.Tag = url.GetParam(constant.ApplicationTagKey, "")
+ }
}
func addUrl(m map[string][]*common.URL, url *common.URL) {
diff --git a/metadata/info/metadata_info_test.go
b/metadata/info/metadata_info_test.go
index 7af7dc73c..242f28a39 100644
--- a/metadata/info/metadata_info_test.go
+++ b/metadata/info/metadata_info_test.go
@@ -66,6 +66,21 @@ func TestMetadataInfoAddService(t *testing.T) {
assert.Empty(t, metadataInfo.GetExportedServiceURLs())
}
+func TestMetadataInfoAddServiceBackfillsApplicationTag(t *testing.T) {
+ metadataInfo := &MetadataInfo{
+ Services: make(map[string]*ServiceInfo),
+ exportedServiceURLs: make(map[string][]*common.URL),
+ subscribedServiceURLs: make(map[string][]*common.URL),
+ }
+ url, err :=
common.NewURL("tri://127.0.0.1:20000?application=foo&application.tag=gray&interface=com.foo.Bar&methods=GetPetByID")
+ require.NoError(t, err)
+
+ metadataInfo.AddService(url)
+
+ assert.Equal(t, "foo", metadataInfo.App)
+ assert.Equal(t, "gray", metadataInfo.Tag)
+}
+
func TestMetadataInfoRemoveServiceWithClonedURL(t *testing.T) {
metadataInfo := NewMetadataInfo("foo", "")
url, err :=
common.NewURL("dubbo://127.0.0.1:20000?application=foo&interface=com.foo.Bar&methods=GetPetByID%2CGetPetTypes&side=provider&version=1.0.0")
diff --git a/metadata/metadata_service.go b/metadata/metadata_service.go
index 5e822c620..8cf7da13b 100644
--- a/metadata/metadata_service.go
+++ b/metadata/metadata_service.go
@@ -258,6 +258,7 @@ func (mtsV2 *MetadataServiceV2) GetMetadataInfo(ctx
context.Context, req *triple
App: metadataInfo.App,
Version: metadataInfo.Revision,
Services: convertV2(metadataInfo.Services),
+ Tag: metadataInfo.Tag,
}, err
}
diff --git a/metadata/metadata_service_test.go
b/metadata/metadata_service_test.go
index c010457e0..67a0bb557 100644
--- a/metadata/metadata_service_test.go
+++ b/metadata/metadata_service_test.go
@@ -18,6 +18,7 @@
package metadata
import (
+ "context"
"strconv"
"testing"
)
@@ -32,6 +33,7 @@ import (
"dubbo.apache.org/dubbo-go/v3/common/constant"
"dubbo.apache.org/dubbo-go/v3/common/extension"
"dubbo.apache.org/dubbo-go/v3/metadata/info"
+ tripleapi "dubbo.apache.org/dubbo-go/v3/metadata/triple_api/proto"
"dubbo.apache.org/dubbo-go/v3/protocol/base"
_ "dubbo.apache.org/dubbo-go/v3/proxy/proxy_factory"
)
@@ -263,6 +265,33 @@ func TestDefaultMetadataServiceMethodMapper(t *testing.T) {
}
}
+func TestMetadataServiceV2GetMetadataInfoPreservesTag(t *testing.T) {
+ delegate := &DefaultMetadataService{
+ metadataMap: map[string]*info.MetadataInfo{
+ "revision": {
+ App: "dubbo-app",
+ Revision: "revision",
+ Tag: "gray",
+ Services: map[string]*info.ServiceInfo{
+ "DemoService:tri": {
+ Name: "DemoService",
+ Protocol: "tri",
+ },
+ },
+ },
+ },
+ }
+ svc := &MetadataServiceV2{delegate: delegate}
+
+ got, err := svc.GetMetadataInfo(context.TODO(),
&tripleapi.MetadataRequest{Revision: "revision"})
+ require.NoError(t, err)
+ require.NotNil(t, got)
+ assert.Equal(t, "dubbo-app", got.App)
+ assert.Equal(t, "revision", got.Version)
+ assert.Equal(t, "gray", got.Tag)
+ assert.Contains(t, got.Services, "DemoService:tri")
+}
+
func TestDefaultMetadataServiceSetMetadataServiceURL(t *testing.T) {
type args struct {
url *common.URL
diff --git a/metadata/report/zookeeper/report_test.go
b/metadata/report/zookeeper/report_test.go
index d17db0eef..d485b2dbc 100644
--- a/metadata/report/zookeeper/report_test.go
+++ b/metadata/report/zookeeper/report_test.go
@@ -38,6 +38,7 @@ func TestMetadataInfoSerialization(t *testing.T) {
original := &info.MetadataInfo{
App: "test-app",
Revision: "1.0.0",
+ Tag: "gray",
Services: map[string]*info.ServiceInfo{
"com.example.TestService": {
Name: "com.example.TestService", Protocol:
"dubbo",
@@ -53,6 +54,7 @@ func TestMetadataInfoSerialization(t *testing.T) {
require.NoError(t, err)
assert.Equal(t, original.App, restored.App)
assert.Equal(t, original.Revision, restored.Revision)
+ assert.Equal(t, original.Tag, restored.Tag)
// Invalid JSON
err = json.Unmarshal([]byte(`{invalid}`), &restored)
diff --git a/metadata/triple_api/proto/metadata_service_v2.pb.go
b/metadata/triple_api/proto/metadata_service_v2.pb.go
index 5ecc9d4fe..46ca2c2ef 100644
--- a/metadata/triple_api/proto/metadata_service_v2.pb.go
+++ b/metadata/triple_api/proto/metadata_service_v2.pb.go
@@ -22,15 +22,11 @@
package triple_api
-import (
- reflect "reflect"
- sync "sync"
-)
-
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
-
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
)
const (
@@ -95,6 +91,7 @@ type MetadataInfoV2 struct {
App string
`protobuf:"bytes,1,opt,name=app,proto3" json:"app,omitempty"`
Version string
`protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
Services map[string]*ServiceInfoV2
`protobuf:"bytes,3,rep,name=services,proto3" json:"services,omitempty"
protobuf_key:"bytes,1,opt,name=key,proto3"
protobuf_val:"bytes,2,opt,name=value,proto3"`
+ Tag string
`protobuf:"bytes,4,opt,name=tag,proto3" json:"tag,omitempty"`
}
func (x *MetadataInfoV2) Reset() {
@@ -150,6 +147,13 @@ func (x *MetadataInfoV2) GetServices()
map[string]*ServiceInfoV2 {
return nil
}
+func (x *MetadataInfoV2) GetTag() string {
+ if x != nil {
+ return x.Tag
+ }
+ return ""
+}
+
type ServiceInfoV2 struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -254,7 +258,7 @@ var file_proto_metadata_service_v2_proto_rawDesc = []byte{
0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
0x22, 0x2d, 0x0a, 0x0f,
0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12,
0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18,
0x01, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x22,
0xf8, 0x01, 0x0a, 0x0e,
+ 0x09, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x22,
0x8a, 0x02, 0x0a, 0x0e,
0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x49, 0x6e, 0x66, 0x6f,
0x56, 0x32, 0x12, 0x10,
0x0a, 0x03, 0x61, 0x70, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x03, 0x61, 0x70, 0x70,
0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18,
0x02, 0x20, 0x01, 0x28,
@@ -263,46 +267,47 @@ var file_proto_metadata_service_v2_proto_rawDesc = []byte{
0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x64, 0x75,
0x62, 0x62, 0x6f, 0x2e,
0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4d, 0x65, 0x74,
0x61, 0x64, 0x61, 0x74,
0x61, 0x49, 0x6e, 0x66, 0x6f, 0x56, 0x32, 0x2e, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x73,
- 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x73, 0x1a,
- 0x65, 0x0a, 0x0d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x45,
0x6e, 0x74, 0x72, 0x79,
- 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x6b,
- 0x65, 0x79, 0x12, 0x3e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63,
0x68, 0x65, 0x2e, 0x64,
- 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
0x61, 0x2e, 0x53, 0x65,
- 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x56, 0x32, 0x52,
0x05, 0x76, 0x61, 0x6c,
- 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xa0, 0x02, 0x0a, 0x0d, 0x53,
0x65, 0x72, 0x76, 0x69,
- 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x56, 0x32, 0x12, 0x12, 0x0a, 0x04,
0x6e, 0x61, 0x6d, 0x65,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x12, 0x14, 0x0a, 0x05,
- 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x05, 0x67, 0x72, 0x6f,
- 0x75, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
0x6e, 0x18, 0x03, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
0x12, 0x1a, 0x0a, 0x08,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01,
0x28, 0x09, 0x52, 0x08,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x12, 0x0a, 0x04,
0x70, 0x6f, 0x72, 0x74,
- 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74,
0x12, 0x12, 0x0a, 0x04,
- 0x70, 0x61, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x70, 0x61, 0x74, 0x68,
- 0x12, 0x4c, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x07,
0x20, 0x03, 0x28, 0x0b,
- 0x32, 0x34, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68,
0x65, 0x2e, 0x64, 0x75,
- 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
0x2e, 0x53, 0x65, 0x72,
- 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x56, 0x32, 0x2e, 0x50,
0x61, 0x72, 0x61, 0x6d,
- 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61,
0x6d, 0x73, 0x1a, 0x39,
- 0x0a, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72,
0x79, 0x12, 0x10, 0x0a,
- 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
0x6b, 0x65, 0x79, 0x12,
- 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x05,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0x7d, 0x0a,
0x11, 0x4d, 0x65, 0x74,
- 0x61, 0x64, 0x61, 0x74, 0x61, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x56, 0x32, 0x12, 0x68,
- 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
0x61, 0x49, 0x6e, 0x66,
- 0x6f, 0x12, 0x2a, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63,
0x68, 0x65, 0x2e, 0x64,
- 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
0x61, 0x2e, 0x4d, 0x65,
- 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x29, 0x2e,
- 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x64,
0x75, 0x62, 0x62, 0x6f,
- 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4d, 0x65,
0x74, 0x61, 0x64, 0x61,
- 0x74, 0x61, 0x49, 0x6e, 0x66, 0x6f, 0x56, 0x32, 0x42, 0x5a, 0x0a, 0x19,
0x6f, 0x72, 0x67, 0x2e,
- 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f,
0x2e, 0x6d, 0x65, 0x74,
- 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x01, 0x5a, 0x3b, 0x64, 0x75, 0x62,
0x62, 0x6f, 0x2e, 0x61,
- 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x64, 0x75,
0x62, 0x62, 0x6f, 0x2d,
- 0x67, 0x6f, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
0x74, 0x61, 0x2f, 0x74,
- 0x72, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x3b, 0x74, 0x72,
0x69, 0x70, 0x6c, 0x65,
- 0x5f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x73, 0x12,
+ 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
0x52, 0x03, 0x74, 0x61,
+ 0x67, 0x1a, 0x65, 0x0a, 0x0d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x73, 0x45, 0x6e, 0x74,
+ 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52,
+ 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70,
0x61, 0x63, 0x68, 0x65,
+ 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64,
0x61, 0x74, 0x61, 0x2e,
+ 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x56,
0x32, 0x52, 0x05, 0x76,
+ 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xa0, 0x02, 0x0a,
0x0d, 0x53, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x56, 0x32, 0x12, 0x12,
0x0a, 0x04, 0x6e, 0x61,
+ 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x12, 0x14,
+ 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x67,
+ 0x72, 0x6f, 0x75, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69,
0x6f, 0x6e, 0x12, 0x1a,
+ 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x04,
0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x12,
0x0a, 0x04, 0x70, 0x6f,
+ 0x72, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f,
0x72, 0x74, 0x12, 0x12,
+ 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x70, 0x61,
+ 0x74, 0x68, 0x12, 0x4c, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73,
0x18, 0x07, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61,
0x63, 0x68, 0x65, 0x2e,
+ 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
0x74, 0x61, 0x2e, 0x53,
+ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x56, 0x32,
0x2e, 0x50, 0x61, 0x72,
+ 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x70, 0x61,
0x72, 0x61, 0x6d, 0x73,
+ 0x1a, 0x39, 0x0a, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x12,
+ 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x03, 0x6b, 0x65,
+ 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32,
0x7d, 0x0a, 0x11, 0x4d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x53, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x56, 0x32,
+ 0x12, 0x68, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64,
0x61, 0x74, 0x61, 0x49,
+ 0x6e, 0x66, 0x6f, 0x12, 0x2a, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70,
0x61, 0x63, 0x68, 0x65,
+ 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64,
0x61, 0x74, 0x61, 0x2e,
+ 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a,
+ 0x29, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65,
0x2e, 0x64, 0x75, 0x62,
+ 0x62, 0x6f, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e,
0x4d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x49, 0x6e, 0x66, 0x6f, 0x56, 0x32, 0x42, 0x5a,
0x0a, 0x19, 0x6f, 0x72,
+ 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x64, 0x75, 0x62,
0x62, 0x6f, 0x2e, 0x6d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x01, 0x5a, 0x3b, 0x64,
0x75, 0x62, 0x62, 0x6f,
+ 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x2f,
0x64, 0x75, 0x62, 0x62,
+ 0x6f, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x65, 0x74, 0x61,
0x64, 0x61, 0x74, 0x61,
+ 0x2f, 0x74, 0x72, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x3b,
0x74, 0x72, 0x69, 0x70,
+ 0x6c, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
}
var (
@@ -318,7 +323,7 @@ func file_proto_metadata_service_v2_proto_rawDescGZIP()
[]byte {
}
var file_proto_metadata_service_v2_proto_msgTypes =
make([]protoimpl.MessageInfo, 5)
-var file_proto_metadata_service_v2_proto_goTypes = []any{
+var file_proto_metadata_service_v2_proto_goTypes = []interface{}{
(*MetadataRequest)(nil), // 0: org.apache.dubbo.metadata.MetadataRequest
(*MetadataInfoV2)(nil), // 1: org.apache.dubbo.metadata.MetadataInfoV2
(*ServiceInfoV2)(nil), // 2: org.apache.dubbo.metadata.ServiceInfoV2
@@ -344,7 +349,7 @@ func file_proto_metadata_service_v2_proto_init() {
return
}
if !protoimpl.UnsafeEnabled {
- file_proto_metadata_service_v2_proto_msgTypes[0].Exporter =
func(v any, i int) any {
+ file_proto_metadata_service_v2_proto_msgTypes[0].Exporter =
func(v interface{}, i int) interface{} {
switch v := v.(*MetadataRequest); i {
case 0:
return &v.state
@@ -356,7 +361,7 @@ func file_proto_metadata_service_v2_proto_init() {
return nil
}
}
- file_proto_metadata_service_v2_proto_msgTypes[1].Exporter =
func(v any, i int) any {
+ file_proto_metadata_service_v2_proto_msgTypes[1].Exporter =
func(v interface{}, i int) interface{} {
switch v := v.(*MetadataInfoV2); i {
case 0:
return &v.state
@@ -368,7 +373,7 @@ func file_proto_metadata_service_v2_proto_init() {
return nil
}
}
- file_proto_metadata_service_v2_proto_msgTypes[2].Exporter =
func(v any, i int) any {
+ file_proto_metadata_service_v2_proto_msgTypes[2].Exporter =
func(v interface{}, i int) interface{} {
switch v := v.(*ServiceInfoV2); i {
case 0:
return &v.state
diff --git a/metadata/triple_api/proto/metadata_service_v2.proto
b/metadata/triple_api/proto/metadata_service_v2.proto
index 77c49d102..62cd5b3ba 100644
--- a/metadata/triple_api/proto/metadata_service_v2.proto
+++ b/metadata/triple_api/proto/metadata_service_v2.proto
@@ -34,6 +34,7 @@ message MetadataInfoV2{
string app = 1;
string version = 2;
map<string,ServiceInfoV2> services = 3;
+ string tag = 4;
}
message ServiceInfoV2{