From 698ed86c7604c10b616ee9c2733ac57adb74185f Mon Sep 17 00:00:00 2001
From: gongshangguo <gongshangguo@admin.com>
Date: 星期五, 04 三月 2022 16:09:52 +0800
Subject: [PATCH] 更新直接发送请求proto
---
aiotProto/aiot/aiot_business.pb.go | 78 +++++++++++++-------------
aiotProto/aiot/aiot_business.pb.micro.go | 37 +++++++++---
aiotProto/aiot/aiot_business.proto | 6 +
3 files changed, 71 insertions(+), 50 deletions(-)
diff --git a/aiotProto/aiot/aiot_business.pb.go b/aiotProto/aiot/aiot_business.pb.go
index 97f7840..6ceba03 100644
--- a/aiotProto/aiot/aiot_business.pb.go
+++ b/aiotProto/aiot/aiot_business.pb.go
@@ -491,43 +491,43 @@
}
var fileDescriptor_29eca6d4b33e7fd8 = []byte{
- // 594 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x54, 0xcd, 0x6e, 0xd4, 0x30,
- 0x10, 0xae, 0x93, 0xec, 0xdf, 0x6c, 0xb3, 0x78, 0xa7, 0x50, 0x59, 0x15, 0x48, 0xcb, 0x8a, 0xc3,
- 0xaa, 0x88, 0x1e, 0x0a, 0x07, 0xc4, 0xad, 0xb4, 0x02, 0xb5, 0x52, 0x51, 0xe5, 0x16, 0xc1, 0x0d,
- 0xa5, 0x8e, 0xa1, 0x91, 0x92, 0x38, 0x8d, 0x1d, 0xaa, 0xe5, 0x25, 0x78, 0x10, 0x1e, 0x8c, 0x17,
- 0xe0, 0xc4, 0x09, 0xd9, 0xc9, 0xb2, 0x59, 0x95, 0x0a, 0x95, 0x23, 0xb7, 0x99, 0xf9, 0xe6, 0xb3,
- 0xfd, 0xcd, 0x8f, 0x61, 0x23, 0x4a, 0x94, 0xf9, 0x70, 0x5e, 0xe9, 0x24, 0x97, 0x5a, 0xef, 0x14,
- 0xa5, 0x32, 0x0a, 0x03, 0x1b, 0xdc, 0x1a, 0x3b, 0x48, 0xa8, 0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xdb, 0x9a, 0xc4, 0xd4, 0xc3, 0x7b, 0x30, 0x3e, 0xae, 0x52,
- 0x93, 0x14, 0x51, 0x69, 0x2c, 0x78, 0x10, 0x99, 0x88, 0xfa, 0x88, 0x30, 0x6a, 0x33, 0xb3, 0x94,
- 0x06, 0xbb, 0xdf, 0x09, 0x0c, 0xf7, 0x12, 0x65, 0x4e, 0x65, 0xf9, 0x39, 0x11, 0x12, 0x77, 0x01,
- 0x4e, 0x65, 0x1e, 0x9f, 0x29, 0x3b, 0x72, 0x18, 0xd6, 0xdd, 0x6b, 0x7e, 0xaa, 0xad, 0xa6, 0xfd,
- 0x2b, 0x7d, 0x99, 0xae, 0xe1, 0x33, 0x18, 0x5a, 0x8e, 0x3d, 0xc6, 0xce, 0xe8, 0xa8, 0xce, 0x3a,
- 0xb1, 0x1f, 0x9d, 0x50, 0xe9, 0x4d, 0xac, 0xe7, 0x10, 0xd6, 0x37, 0x35, 0x9b, 0x8d, 0xb4, 0xce,
- 0x5b, 0x2e, 0xfa, 0x5f, 0xee, 0xab, 0xdf, 0xa8, 0x17, 0xf7, 0x2d, 0x76, 0xe4, 0x06, 0xd6, 0x79,
- 0xd7, 0xfd, 0xbc, 0x4f, 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0x5a, 0x92, 0x1f, 0x84, 0xa9, 0x05,
- 0x00, 0x00,
+ // 607 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x54, 0x4d, 0x6f, 0xd3, 0x40,
+ 0x10, 0xad, 0x3f, 0xf2, 0x35, 0xa9, 0xd3, 0xcd, 0x14, 0xaa, 0x55, 0x05, 0x52, 0x88, 0x38, 0x44,
+ 0x45, 0xf4, 0x50, 0x38, 0x14, 0x6e, 0xa5, 0x15, 0xa8, 0x95, 0x8a, 0xaa, 0x6d, 0x11, 0xdc, 0x90,
+ 0xbb, 0x5e, 0xa8, 0x25, 0xd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, 0xd9, 0xb5, 0x87, 0xfb,
+ 0xd9, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf4, 0xf5, 0x43, 0x89, 0xe8, 0x05, 0x00, 0x00,
}
diff --git a/aiotProto/aiot/aiot_business.pb.micro.go b/aiotProto/aiot/aiot_business.pb.micro.go
index 0df5c72..85ade0b 100644
--- a/aiotProto/aiot/aiot_business.pb.micro.go
+++ b/aiotProto/aiot/aiot_business.pb.micro.go
@@ -36,8 +36,10 @@
type AiotService interface {
// 鍙戦�佹寚鍚戝崟涓澶囩殑璇锋眰
SendToNode(ctx context.Context, in *NodeReq, opts ...client.CallOption) (*BusinessReply, error)
- // 鐩存帴鍙戦�乼cp璇锋眰
- SendAiotReq(ctx context.Context, in *Protocol, opts ...client.CallOption) (*BusinessReply, error)
+ // 鐩存帴鍙戦�佸悓姝cp璇锋眰
+ SendAiotSyncReq(ctx context.Context, in *Protocol, opts ...client.CallOption) (*BusinessReply, error)
+ // 鐩存帴鍙戦�佸紓姝cp璇锋眰
+ SendAiotAsyncReq(ctx context.Context, in *Protocol, opts ...client.CallOption) (*BusinessReply, error)
// 鍙戦�佺兢缁勮姹�
SendToCluster(ctx context.Context, in *ClusterReq, opts ...client.CallOption) (*BusinessReply, error)
// 鍚戝涓澶囧悓鏃跺彂璧风浉鍚屽弬鏁拌姹�
@@ -72,8 +74,18 @@
return out, nil
}
-func (c *aiotService) SendAiotReq(ctx context.Context, in *Protocol, opts ...client.CallOption) (*BusinessReply, error) {
- req := c.c.NewRequest(c.name, "AiotService.SendAiotReq", in)
+func (c *aiotService) SendAiotSyncReq(ctx context.Context, in *Protocol, opts ...client.CallOption) (*BusinessReply, error) {
+ req := c.c.NewRequest(c.name, "AiotService.SendAiotSyncReq", in)
+ out := new(BusinessReply)
+ err := c.c.Call(ctx, req, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *aiotService) SendAiotAsyncReq(ctx context.Context, in *Protocol, opts ...client.CallOption) (*BusinessReply, error) {
+ req := c.c.NewRequest(c.name, "AiotService.SendAiotAsyncReq", in)
out := new(BusinessReply)
err := c.c.Call(ctx, req, out, opts...)
if err != nil {
@@ -107,8 +119,10 @@
type AiotServiceHandler interface {
// 鍙戦�佹寚鍚戝崟涓澶囩殑璇锋眰
SendToNode(context.Context, *NodeReq, *BusinessReply) error
- // 鐩存帴鍙戦�乼cp璇锋眰
- SendAiotReq(context.Context, *Protocol, *BusinessReply) error
+ // 鐩存帴鍙戦�佸悓姝cp璇锋眰
+ SendAiotSyncReq(context.Context, *Protocol, *BusinessReply) error
+ // 鐩存帴鍙戦�佸紓姝cp璇锋眰
+ SendAiotAsyncReq(context.Context, *Protocol, *BusinessReply) error
// 鍙戦�佺兢缁勮姹�
SendToCluster(context.Context, *ClusterReq, *BusinessReply) error
// 鍚戝涓澶囧悓鏃跺彂璧风浉鍚屽弬鏁拌姹�
@@ -118,7 +132,8 @@
func RegisterAiotServiceHandler(s server.Server, hdlr AiotServiceHandler, opts ...server.HandlerOption) error {
type aiotService interface {
SendToNode(ctx context.Context, in *NodeReq, out *BusinessReply) error
- SendAiotReq(ctx context.Context, in *Protocol, out *BusinessReply) error
+ SendAiotSyncReq(ctx context.Context, in *Protocol, out *BusinessReply) error
+ SendAiotAsyncReq(ctx context.Context, in *Protocol, out *BusinessReply) error
SendToCluster(ctx context.Context, in *ClusterReq, out *BusinessReply) error
SendToNodes(ctx context.Context, in *NodesReq, out *BusinessReply) error
}
@@ -137,8 +152,12 @@
return h.AiotServiceHandler.SendToNode(ctx, in, out)
}
-func (h *aiotServiceHandler) SendAiotReq(ctx context.Context, in *Protocol, out *BusinessReply) error {
- return h.AiotServiceHandler.SendAiotReq(ctx, in, out)
+func (h *aiotServiceHandler) SendAiotSyncReq(ctx context.Context, in *Protocol, out *BusinessReply) error {
+ return h.AiotServiceHandler.SendAiotSyncReq(ctx, in, out)
+}
+
+func (h *aiotServiceHandler) SendAiotAsyncReq(ctx context.Context, in *Protocol, out *BusinessReply) error {
+ return h.AiotServiceHandler.SendAiotAsyncReq(ctx, in, out)
}
func (h *aiotServiceHandler) SendToCluster(ctx context.Context, in *ClusterReq, out *BusinessReply) error {
diff --git a/aiotProto/aiot/aiot_business.proto b/aiotProto/aiot/aiot_business.proto
index 1e11231..7b8c647 100644
--- a/aiotProto/aiot/aiot_business.proto
+++ b/aiotProto/aiot/aiot_business.proto
@@ -105,8 +105,10 @@
service AiotService {
// 鍙戦�佹寚鍚戝崟涓澶囩殑璇锋眰
rpc SendToNode(NodeReq) returns (BusinessReply){}
- // 鐩存帴鍙戦�乼cp璇锋眰
- rpc SendAiotReq(Protocol) returns (BusinessReply){}
+ // 鐩存帴鍙戦�佸悓姝cp璇锋眰
+ rpc SendAiotSyncReq(Protocol) returns (BusinessReply){}
+ // 鐩存帴鍙戦�佸紓姝cp璇锋眰
+ rpc SendAiotAsyncReq(Protocol) returns (BusinessReply){}
// 鍙戦�佺兢缁勮姹�
rpc SendToCluster(ClusterReq) returns (BusinessReply){}
// 鍚戝涓澶囧悓鏃跺彂璧风浉鍚屽弬鏁拌姹�
--
Gitblit v1.8.0