You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eventmesh.apache.org by mi...@apache.org on 2022/10/02 09:26:44 UTC

[incubator-eventmesh] branch master updated: modify eventMesh-catalog api module

This is an automated email from the ASF dual-hosted git repository.

mikexue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-eventmesh.git


The following commit(s) were added to refs/heads/master by this push:
     new 681eb9f4 modify eventMesh-catalog api module
     new 7e470050 Merge pull request #1466 from walterlife/modify-catalog-api
681eb9f4 is described below

commit 681eb9f403ae0758586a838ee756aac4855c17c8
Author: walterlife <wa...@gmail.com>
AuthorDate: Sat Oct 1 20:48:40 2022 +0800

    modify eventMesh-catalog api module
---
 eventmesh-catalog-go/api/catalog.go               |  15 +-
 eventmesh-catalog-go/api/proto/catalog.pb.go      | 215 +++++++++++++++-------
 eventmesh-catalog-go/api/proto/catalog.proto      |  17 +-
 eventmesh-catalog-go/api/proto/catalog_grpc.pb.go |  28 +--
 4 files changed, 185 insertions(+), 90 deletions(-)

diff --git a/eventmesh-catalog-go/api/catalog.go b/eventmesh-catalog-go/api/catalog.go
index aafd92da..b6451915 100644
--- a/eventmesh-catalog-go/api/catalog.go
+++ b/eventmesh-catalog-go/api/catalog.go
@@ -53,7 +53,7 @@ func (c *catalogImpl) Registry(ctx context.Context, request *proto.RegistryReque
 	if len(doc.Channels()) == 0 {
 		return rsp, nil
 	}
-	if err := dal.GetDalClient().Transaction(func(tx *gorm.DB) error {
+	if err := dal.GetDalClient().WithContext(ctx).Transaction(func(tx *gorm.DB) error {
 		var handlers []func() error
 		for _, channel := range doc.Channels() {
 			for _, operation := range channel.Operations() {
@@ -74,15 +74,16 @@ func (c *catalogImpl) Registry(ctx context.Context, request *proto.RegistryReque
 	return rsp, nil
 }
 
-func (c *catalogImpl) Query(ctx context.Context, in *proto.QueryRequest) (*proto.QueryResponse, error) {
-	var rsp = &proto.QueryResponse{}
-	res, err := c.catalogDAL.Select(ctx, in.OperationId)
+func (c *catalogImpl) QueryOperations(ctx context.Context, in *proto.QueryOperationsRequest) (*proto.
+	QueryOperationsResponse, error) {
+	var rsp = &proto.QueryOperationsResponse{}
+	res, err := c.catalogDAL.SelectOperations(ctx, in.ServiceName, in.OperationId)
 	if err != nil {
 		return rsp, err
 	}
-	rsp.Type = res.Type
-	rsp.ChannelName = res.ChannelName
-	rsp.Schema = res.Schema
+	if err = gconv.Structs(rsp.Operations, &res); err != nil {
+		return nil, err
+	}
 	return rsp, nil
 }
 
diff --git a/eventmesh-catalog-go/api/proto/catalog.pb.go b/eventmesh-catalog-go/api/proto/catalog.pb.go
index ad922345..774380c8 100644
--- a/eventmesh-catalog-go/api/proto/catalog.pb.go
+++ b/eventmesh-catalog-go/api/proto/catalog.pb.go
@@ -129,16 +129,17 @@ func (*RegistryResponse) Descriptor() ([]byte, []int) {
 	return file_catalog_proto_rawDescGZIP(), []int{1}
 }
 
-type QueryRequest struct {
+type QueryOperationsRequest struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	OperationId string `protobuf:"bytes,1,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"`
+	ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"`
+	OperationId string `protobuf:"bytes,2,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"`
 }
 
-func (x *QueryRequest) Reset() {
-	*x = QueryRequest{}
+func (x *QueryOperationsRequest) Reset() {
+	*x = QueryOperationsRequest{}
 	if protoimpl.UnsafeEnabled {
 		mi := &file_catalog_proto_msgTypes[2]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -146,13 +147,13 @@ func (x *QueryRequest) Reset() {
 	}
 }
 
-func (x *QueryRequest) String() string {
+func (x *QueryOperationsRequest) String() string {
 	return protoimpl.X.MessageStringOf(x)
 }
 
-func (*QueryRequest) ProtoMessage() {}
+func (*QueryOperationsRequest) ProtoMessage() {}
 
-func (x *QueryRequest) ProtoReflect() protoreflect.Message {
+func (x *QueryOperationsRequest) ProtoReflect() protoreflect.Message {
 	mi := &file_catalog_proto_msgTypes[2]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -164,19 +165,26 @@ func (x *QueryRequest) ProtoReflect() protoreflect.Message {
 	return mi.MessageOf(x)
 }
 
-// Deprecated: Use QueryRequest.ProtoReflect.Descriptor instead.
-func (*QueryRequest) Descriptor() ([]byte, []int) {
+// Deprecated: Use QueryOperationsRequest.ProtoReflect.Descriptor instead.
+func (*QueryOperationsRequest) Descriptor() ([]byte, []int) {
 	return file_catalog_proto_rawDescGZIP(), []int{2}
 }
 
-func (x *QueryRequest) GetOperationId() string {
+func (x *QueryOperationsRequest) GetServiceName() string {
+	if x != nil {
+		return x.ServiceName
+	}
+	return ""
+}
+
+func (x *QueryOperationsRequest) GetOperationId() string {
 	if x != nil {
 		return x.OperationId
 	}
 	return ""
 }
 
-type QueryResponse struct {
+type Operation struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
@@ -187,8 +195,8 @@ type QueryResponse struct {
 	Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
 }
 
-func (x *QueryResponse) Reset() {
-	*x = QueryResponse{}
+func (x *Operation) Reset() {
+	*x = Operation{}
 	if protoimpl.UnsafeEnabled {
 		mi := &file_catalog_proto_msgTypes[3]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -196,13 +204,13 @@ func (x *QueryResponse) Reset() {
 	}
 }
 
-func (x *QueryResponse) String() string {
+func (x *Operation) String() string {
 	return protoimpl.X.MessageStringOf(x)
 }
 
-func (*QueryResponse) ProtoMessage() {}
+func (*Operation) ProtoMessage() {}
 
-func (x *QueryResponse) ProtoReflect() protoreflect.Message {
+func (x *Operation) ProtoReflect() protoreflect.Message {
 	mi := &file_catalog_proto_msgTypes[3]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -214,32 +222,79 @@ func (x *QueryResponse) ProtoReflect() protoreflect.Message {
 	return mi.MessageOf(x)
 }
 
-// Deprecated: Use QueryResponse.ProtoReflect.Descriptor instead.
-func (*QueryResponse) Descriptor() ([]byte, []int) {
+// Deprecated: Use Operation.ProtoReflect.Descriptor instead.
+func (*Operation) Descriptor() ([]byte, []int) {
 	return file_catalog_proto_rawDescGZIP(), []int{3}
 }
 
-func (x *QueryResponse) GetChannelName() string {
+func (x *Operation) GetChannelName() string {
 	if x != nil {
 		return x.ChannelName
 	}
 	return ""
 }
 
-func (x *QueryResponse) GetSchema() string {
+func (x *Operation) GetSchema() string {
 	if x != nil {
 		return x.Schema
 	}
 	return ""
 }
 
-func (x *QueryResponse) GetType() string {
+func (x *Operation) GetType() string {
 	if x != nil {
 		return x.Type
 	}
 	return ""
 }
 
+type QueryOperationsResponse struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Operations []*Operation `protobuf:"bytes,1,rep,name=operations,proto3" json:"operations,omitempty"`
+}
+
+func (x *QueryOperationsResponse) Reset() {
+	*x = QueryOperationsResponse{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_catalog_proto_msgTypes[4]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *QueryOperationsResponse) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*QueryOperationsResponse) ProtoMessage() {}
+
+func (x *QueryOperationsResponse) ProtoReflect() protoreflect.Message {
+	mi := &file_catalog_proto_msgTypes[4]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use QueryOperationsResponse.ProtoReflect.Descriptor instead.
+func (*QueryOperationsResponse) Descriptor() ([]byte, []int) {
+	return file_catalog_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *QueryOperationsResponse) GetOperations() []*Operation {
+	if x != nil {
+		return x.Operations
+	}
+	return nil
+}
+
 var File_catalog_proto protoreflect.FileDescriptor
 
 var file_catalog_proto_rawDesc = []byte{
@@ -252,35 +307,51 @@ var file_catalog_proto_rawDesc = []byte{
 	0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20,
 	0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22,
 	0x12, 0x0a, 0x10, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f,
-	0x6e, 0x73, 0x65, 0x22, 0x31, 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75,
-	0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
-	0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61,
-	0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x5e, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52,
-	0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x68, 0x61, 0x6e, 0x6e,
-	0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63,
-	0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63,
-	0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65,
-	0x6d, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
-	0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x32, 0xe2, 0x01, 0x0a, 0x07, 0x43, 0x61, 0x74, 0x61, 0x6c,
-	0x6f, 0x67, 0x12, 0x6f, 0x0a, 0x08, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x12, 0x2f,
+	0x6e, 0x73, 0x65, 0x22, 0x5e, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x65, 0x72,
+	0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a,
+	0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65,
+	0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64,
+	0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
+	0x6e, 0x49, 0x64, 0x22, 0x5a, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+	0x12, 0x21, 0x0a, 0x0c, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4e,
+	0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x74,
+	0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22,
+	0x64, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
+	0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x6f, 0x70,
+	0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29,
+	0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c,
+	0x6f, 0x67, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e,
+	0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61,
+	0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x81, 0x02, 0x0a, 0x07, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f,
+	0x67, 0x12, 0x6f, 0x0a, 0x08, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x12, 0x2f, 0x2e,
+	0x65, 0x76, 0x65, 0x6e, 0x74, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f,
+	0x67, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x52,
+	0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30,
 	0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c,
 	0x6f, 0x67, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e,
-	0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
-	0x30, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x63, 0x61, 0x74, 0x61,
-	0x6c, 0x6f, 0x67, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c,
-	0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
-	0x65, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2c, 0x2e, 0x65,
-	0x76, 0x65, 0x6e, 0x74, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67,
-	0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x51, 0x75,
-	0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x76, 0x65,
-	0x6e, 0x74, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x61,
-	0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x51, 0x75, 0x65, 0x72,
-	0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x46, 0x5a, 0x44, 0x67,
-	0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65,
-	0x2f, 0x69, 0x6e, 0x63, 0x75, 0x62, 0x61, 0x74, 0x6f, 0x72, 0x2d, 0x65, 0x76, 0x65, 0x6e, 0x74,
-	0x6d, 0x65, 0x73, 0x68, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x6d, 0x65, 0x73, 0x68, 0x2d, 0x63,
-	0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2d, 0x67, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72,
-	0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+	0x22, 0x00, 0x12, 0x84, 0x01, 0x0a, 0x0f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x65, 0x72,
+	0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x36, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x6d, 0x65,
+	0x73, 0x68, 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70,
+	0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x65,
+	0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37,
+	0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c,
+	0x6f, 0x67, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e,
+	0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52,
+	0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x93, 0x01, 0x0a, 0x33, 0x6f, 0x72,
+	0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x6d, 0x65,
+	0x73, 0x68, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63,
+	0x6f, 0x6c, 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+	0x73, 0x42, 0x14, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x6d, 0x65, 0x73, 0x68, 0x43, 0x61, 0x74, 0x61,
+	0x6c, 0x6f, 0x67, 0x47, 0x72, 0x70, 0x63, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75,
+	0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x69, 0x6e, 0x63,
+	0x75, 0x62, 0x61, 0x74, 0x6f, 0x72, 0x2d, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x6d, 0x65, 0x73, 0x68,
+	0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x6d, 0x65, 0x73, 0x68, 0x2d, 0x63, 0x61, 0x74, 0x61, 0x6c,
+	0x6f, 0x67, 0x2d, 0x67, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+	0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -295,23 +366,25 @@ func file_catalog_proto_rawDescGZIP() []byte {
 	return file_catalog_proto_rawDescData
 }
 
-var file_catalog_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
+var file_catalog_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
 var file_catalog_proto_goTypes = []interface{}{
-	(*RegistryRequest)(nil),  // 0: eventmesh.catalog.api.protocol.RegistryRequest
-	(*RegistryResponse)(nil), // 1: eventmesh.catalog.api.protocol.RegistryResponse
-	(*QueryRequest)(nil),     // 2: eventmesh.catalog.api.protocol.QueryRequest
-	(*QueryResponse)(nil),    // 3: eventmesh.catalog.api.protocol.QueryResponse
+	(*RegistryRequest)(nil),         // 0: eventmesh.catalog.api.protocol.RegistryRequest
+	(*RegistryResponse)(nil),        // 1: eventmesh.catalog.api.protocol.RegistryResponse
+	(*QueryOperationsRequest)(nil),  // 2: eventmesh.catalog.api.protocol.QueryOperationsRequest
+	(*Operation)(nil),               // 3: eventmesh.catalog.api.protocol.Operation
+	(*QueryOperationsResponse)(nil), // 4: eventmesh.catalog.api.protocol.QueryOperationsResponse
 }
 var file_catalog_proto_depIdxs = []int32{
-	0, // 0: eventmesh.catalog.api.protocol.Catalog.Registry:input_type -> eventmesh.catalog.api.protocol.RegistryRequest
-	2, // 1: eventmesh.catalog.api.protocol.Catalog.Query:input_type -> eventmesh.catalog.api.protocol.QueryRequest
-	1, // 2: eventmesh.catalog.api.protocol.Catalog.Registry:output_type -> eventmesh.catalog.api.protocol.RegistryResponse
-	3, // 3: eventmesh.catalog.api.protocol.Catalog.Query:output_type -> eventmesh.catalog.api.protocol.QueryResponse
-	2, // [2:4] is the sub-list for method output_type
-	0, // [0:2] is the sub-list for method input_type
-	0, // [0:0] is the sub-list for extension type_name
-	0, // [0:0] is the sub-list for extension extendee
-	0, // [0:0] is the sub-list for field type_name
+	3, // 0: eventmesh.catalog.api.protocol.QueryOperationsResponse.operations:type_name -> eventmesh.catalog.api.protocol.Operation
+	0, // 1: eventmesh.catalog.api.protocol.Catalog.Registry:input_type -> eventmesh.catalog.api.protocol.RegistryRequest
+	2, // 2: eventmesh.catalog.api.protocol.Catalog.QueryOperations:input_type -> eventmesh.catalog.api.protocol.QueryOperationsRequest
+	1, // 3: eventmesh.catalog.api.protocol.Catalog.Registry:output_type -> eventmesh.catalog.api.protocol.RegistryResponse
+	4, // 4: eventmesh.catalog.api.protocol.Catalog.QueryOperations:output_type -> eventmesh.catalog.api.protocol.QueryOperationsResponse
+	3, // [3:5] is the sub-list for method output_type
+	1, // [1:3] is the sub-list for method input_type
+	1, // [1:1] is the sub-list for extension type_name
+	1, // [1:1] is the sub-list for extension extendee
+	0, // [0:1] is the sub-list for field type_name
 }
 
 func init() { file_catalog_proto_init() }
@@ -345,7 +418,7 @@ func file_catalog_proto_init() {
 			}
 		}
 		file_catalog_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*QueryRequest); i {
+			switch v := v.(*QueryOperationsRequest); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -357,7 +430,19 @@ func file_catalog_proto_init() {
 			}
 		}
 		file_catalog_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*QueryResponse); i {
+			switch v := v.(*Operation); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_catalog_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*QueryOperationsResponse); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -375,7 +460,7 @@ func file_catalog_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_catalog_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   4,
+			NumMessages:   5,
 			NumExtensions: 0,
 			NumServices:   1,
 		},
diff --git a/eventmesh-catalog-go/api/proto/catalog.proto b/eventmesh-catalog-go/api/proto/catalog.proto
index 96696f27..a5633d91 100644
--- a/eventmesh-catalog-go/api/proto/catalog.proto
+++ b/eventmesh-catalog-go/api/proto/catalog.proto
@@ -19,11 +19,15 @@ syntax = "proto3";
 
 package eventmesh.catalog.api.protocol;
 
+option java_multiple_files = true;
+option java_package="org.apache.eventmesh.common.protocol.catalog.protos";
+option java_outer_classname = "EventmeshCatalogGrpc";
+
 option go_package = "github.com/apache/incubator-eventmesh/eventmesh-catalog-go/api/proto";
 
 service Catalog {
     rpc Registry (RegistryRequest) returns (RegistryResponse) {}
-    rpc Query (QueryRequest) returns (QueryResponse) {}
+    rpc QueryOperations (QueryOperationsRequest) returns (QueryOperationsResponse) {}
 }
 
 message RegistryRequest {
@@ -34,13 +38,18 @@ message RegistryRequest {
 message RegistryResponse {
 }
 
-message QueryRequest {
-    string operation_id = 1;
+message QueryOperationsRequest {
+    string service_name = 1;
+    string operation_id = 2;
 }
 
-message QueryResponse {
+message Operation {
     string channel_name = 1;
     string schema = 2;
     // publish/subscribe
     string type = 3;
+}
+
+message QueryOperationsResponse {
+    repeated Operation operations = 1;
 }
\ No newline at end of file
diff --git a/eventmesh-catalog-go/api/proto/catalog_grpc.pb.go b/eventmesh-catalog-go/api/proto/catalog_grpc.pb.go
index dbd4ec15..a740cd94 100644
--- a/eventmesh-catalog-go/api/proto/catalog_grpc.pb.go
+++ b/eventmesh-catalog-go/api/proto/catalog_grpc.pb.go
@@ -39,7 +39,7 @@ const _ = grpc.SupportPackageIsVersion7
 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
 type CatalogClient interface {
 	Registry(ctx context.Context, in *RegistryRequest, opts ...grpc.CallOption) (*RegistryResponse, error)
-	Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error)
+	QueryOperations(ctx context.Context, in *QueryOperationsRequest, opts ...grpc.CallOption) (*QueryOperationsResponse, error)
 }
 
 type catalogClient struct {
@@ -59,9 +59,9 @@ func (c *catalogClient) Registry(ctx context.Context, in *RegistryRequest, opts
 	return out, nil
 }
 
-func (c *catalogClient) Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) {
-	out := new(QueryResponse)
-	err := c.cc.Invoke(ctx, "/eventmesh.catalog.api.protocol.Catalog/Query", in, out, opts...)
+func (c *catalogClient) QueryOperations(ctx context.Context, in *QueryOperationsRequest, opts ...grpc.CallOption) (*QueryOperationsResponse, error) {
+	out := new(QueryOperationsResponse)
+	err := c.cc.Invoke(ctx, "/eventmesh.catalog.api.protocol.Catalog/QueryOperations", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -73,7 +73,7 @@ func (c *catalogClient) Query(ctx context.Context, in *QueryRequest, opts ...grp
 // for forward compatibility
 type CatalogServer interface {
 	Registry(context.Context, *RegistryRequest) (*RegistryResponse, error)
-	Query(context.Context, *QueryRequest) (*QueryResponse, error)
+	QueryOperations(context.Context, *QueryOperationsRequest) (*QueryOperationsResponse, error)
 	mustEmbedUnimplementedCatalogServer()
 }
 
@@ -84,8 +84,8 @@ type UnimplementedCatalogServer struct {
 func (UnimplementedCatalogServer) Registry(context.Context, *RegistryRequest) (*RegistryResponse, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method Registry not implemented")
 }
-func (UnimplementedCatalogServer) Query(context.Context, *QueryRequest) (*QueryResponse, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method Query not implemented")
+func (UnimplementedCatalogServer) QueryOperations(context.Context, *QueryOperationsRequest) (*QueryOperationsResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method QueryOperations not implemented")
 }
 func (UnimplementedCatalogServer) mustEmbedUnimplementedCatalogServer() {}
 
@@ -118,20 +118,20 @@ func _Catalog_Registry_Handler(srv interface{}, ctx context.Context, dec func(in
 	return interceptor(ctx, in, info, handler)
 }
 
-func _Catalog_Query_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(QueryRequest)
+func _Catalog_QueryOperations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(QueryOperationsRequest)
 	if err := dec(in); err != nil {
 		return nil, err
 	}
 	if interceptor == nil {
-		return srv.(CatalogServer).Query(ctx, in)
+		return srv.(CatalogServer).QueryOperations(ctx, in)
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/eventmesh.catalog.api.protocol.Catalog/Query",
+		FullMethod: "/eventmesh.catalog.api.protocol.Catalog/QueryOperations",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(CatalogServer).Query(ctx, req.(*QueryRequest))
+		return srv.(CatalogServer).QueryOperations(ctx, req.(*QueryOperationsRequest))
 	}
 	return interceptor(ctx, in, info, handler)
 }
@@ -148,8 +148,8 @@ var Catalog_ServiceDesc = grpc.ServiceDesc{
 			Handler:    _Catalog_Registry_Handler,
 		},
 		{
-			MethodName: "Query",
-			Handler:    _Catalog_Query_Handler,
+			MethodName: "QueryOperations",
+			Handler:    _Catalog_QueryOperations_Handler,
 		},
 	},
 	Streams:  []grpc.StreamDesc{},


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org