From 6993c776bb5bf4f09a0dc166c9aff3d06a560f8f Mon Sep 17 00:00:00 2001 From: soxx Date: Tue, 5 Mar 2024 21:38:46 +0100 Subject: [PATCH] feat: updated generated gRPC to v2 --- pkg/grpc/plug.pb.go | 285 ++++++++++++++++++++++++++++++--------- pkg/grpc/plug_grpc.pb.go | 37 +++++ 2 files changed, 259 insertions(+), 63 deletions(-) diff --git a/pkg/grpc/plug.pb.go b/pkg/grpc/plug.pb.go index 57a792f..fc4fbcd 100644 --- a/pkg/grpc/plug.pb.go +++ b/pkg/grpc/plug.pb.go @@ -9,6 +9,7 @@ package gRPC import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" ) @@ -72,6 +73,116 @@ func (PlugTaskState) EnumDescriptor() ([]byte, []int) { return file_plug_proto_rawDescGZIP(), []int{0} } +type PingRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // Optional message field, can be removed if not needed + Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *PingRequest) Reset() { + *x = PingRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_plug_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PingRequest) ProtoMessage() {} + +func (x *PingRequest) ProtoReflect() protoreflect.Message { + mi := &file_plug_proto_msgTypes[0] + 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 PingRequest.ProtoReflect.Descriptor instead. +func (*PingRequest) Descriptor() ([]byte, []int) { + return file_plug_proto_rawDescGZIP(), []int{0} +} + +func (x *PingRequest) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *PingRequest) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +type PongResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // Optional message field, can be removed if not needed + Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *PongResponse) Reset() { + *x = PongResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_plug_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PongResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PongResponse) ProtoMessage() {} + +func (x *PongResponse) ProtoReflect() protoreflect.Message { + mi := &file_plug_proto_msgTypes[1] + 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 PongResponse.ProtoReflect.Descriptor instead. +func (*PongResponse) Descriptor() ([]byte, []int) { + return file_plug_proto_rawDescGZIP(), []int{1} +} + +func (x *PongResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *PongResponse) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + type PlugTaskStatus struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -84,7 +195,7 @@ type PlugTaskStatus struct { func (x *PlugTaskStatus) Reset() { *x = PlugTaskStatus{} if protoimpl.UnsafeEnabled { - mi := &file_plug_proto_msgTypes[0] + mi := &file_plug_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -97,7 +208,7 @@ func (x *PlugTaskStatus) String() string { func (*PlugTaskStatus) ProtoMessage() {} func (x *PlugTaskStatus) ProtoReflect() protoreflect.Message { - mi := &file_plug_proto_msgTypes[0] + mi := &file_plug_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -110,7 +221,7 @@ func (x *PlugTaskStatus) ProtoReflect() protoreflect.Message { // Deprecated: Use PlugTaskStatus.ProtoReflect.Descriptor instead. func (*PlugTaskStatus) Descriptor() ([]byte, []int) { - return file_plug_proto_rawDescGZIP(), []int{0} + return file_plug_proto_rawDescGZIP(), []int{2} } func (x *PlugTaskStatus) GetTaskId() string { @@ -138,7 +249,7 @@ type PlugTask struct { func (x *PlugTask) Reset() { *x = PlugTask{} if protoimpl.UnsafeEnabled { - mi := &file_plug_proto_msgTypes[1] + mi := &file_plug_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -151,7 +262,7 @@ func (x *PlugTask) String() string { func (*PlugTask) ProtoMessage() {} func (x *PlugTask) ProtoReflect() protoreflect.Message { - mi := &file_plug_proto_msgTypes[1] + mi := &file_plug_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -164,7 +275,7 @@ func (x *PlugTask) ProtoReflect() protoreflect.Message { // Deprecated: Use PlugTask.ProtoReflect.Descriptor instead. func (*PlugTask) Descriptor() ([]byte, []int) { - return file_plug_proto_rawDescGZIP(), []int{1} + return file_plug_proto_rawDescGZIP(), []int{3} } func (x *PlugTask) GetTaskId() string { @@ -187,7 +298,7 @@ type PlugTaskCreation struct { func (x *PlugTaskCreation) Reset() { *x = PlugTaskCreation{} if protoimpl.UnsafeEnabled { - mi := &file_plug_proto_msgTypes[2] + mi := &file_plug_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -200,7 +311,7 @@ func (x *PlugTaskCreation) String() string { func (*PlugTaskCreation) ProtoMessage() {} func (x *PlugTaskCreation) ProtoReflect() protoreflect.Message { - mi := &file_plug_proto_msgTypes[2] + mi := &file_plug_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -213,7 +324,7 @@ func (x *PlugTaskCreation) ProtoReflect() protoreflect.Message { // Deprecated: Use PlugTaskCreation.ProtoReflect.Descriptor instead. func (*PlugTaskCreation) Descriptor() ([]byte, []int) { - return file_plug_proto_rawDescGZIP(), []int{2} + return file_plug_proto_rawDescGZIP(), []int{4} } func (x *PlugTaskCreation) GetUserId() string { @@ -240,40 +351,57 @@ func (x *PlugTaskCreation) GetDeepScrape() bool { var File_plug_proto protoreflect.FileDescriptor var file_plug_proto_rawDesc = []byte{ - 0x0a, 0x0a, 0x70, 0x6c, 0x75, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x58, 0x0a, 0x0e, - 0x50, 0x6c, 0x75, 0x67, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x17, - 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x5f, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x50, 0x6c, - 0x75, 0x67, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x09, 0x74, 0x61, 0x73, - 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x23, 0x0a, 0x08, 0x50, 0x6c, 0x75, 0x67, 0x54, 0x61, - 0x73, 0x6b, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x76, 0x0a, 0x10, 0x50, - 0x6c, 0x75, 0x67, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x10, 0x75, 0x73, 0x65, 0x72, - 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x75, 0x73, 0x65, 0x72, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x65, 0x65, 0x70, 0x5f, 0x73, 0x63, 0x72, 0x61, 0x70, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x65, 0x65, 0x70, 0x53, 0x63, 0x72, - 0x61, 0x70, 0x65, 0x2a, 0x43, 0x0a, 0x0d, 0x50, 0x6c, 0x75, 0x67, 0x54, 0x61, 0x73, 0x6b, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, - 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0b, - 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, - 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x03, 0x32, 0x94, 0x01, 0x0a, 0x0d, 0x50, 0x6c, 0x75, - 0x67, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x2f, 0x0a, 0x09, 0x54, 0x61, - 0x73, 0x6b, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x11, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x54, 0x61, - 0x73, 0x6b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x0f, 0x2e, 0x50, 0x6c, 0x75, - 0x67, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x28, 0x0a, 0x0a, 0x54, - 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x09, 0x2e, 0x50, 0x6c, 0x75, 0x67, - 0x54, 0x61, 0x73, 0x6b, 0x1a, 0x0f, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x54, 0x61, 0x73, 0x6b, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x28, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x61, 0x6e, - 0x63, 0x65, 0x6c, 0x12, 0x09, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x54, 0x61, 0x73, 0x6b, 0x1a, 0x0f, - 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, - 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x2e, 0x64, 0x72, 0x61, 0x67, 0x73, 0x65, 0x2e, 0x69, 0x74, - 0x2f, 0x61, 0x6e, 0x74, 0x68, 0x72, 0x6f, 0x76, 0x65, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x2d, 0x5b, - 0x52, 0x45, 0x50, 0x4c, 0x41, 0x43, 0x45, 0x5f, 0x4d, 0x45, 0x5d, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x67, 0x52, 0x50, 0x43, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x0a, 0x0a, 0x70, 0x6c, 0x75, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x61, 0x0a, + 0x0b, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x22, 0x62, 0x0a, 0x0c, 0x50, 0x6f, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x22, 0x58, 0x0a, 0x0e, 0x50, 0x6c, 0x75, 0x67, 0x54, 0x61, 0x73, 0x6b, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, + 0x2d, 0x0a, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x52, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x23, + 0x0a, 0x08, 0x50, 0x6c, 0x75, 0x67, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x61, + 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x73, + 0x6b, 0x49, 0x64, 0x22, 0x76, 0x0a, 0x10, 0x50, 0x6c, 0x75, 0x67, 0x54, 0x61, 0x73, 0x6b, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, + 0x12, 0x28, 0x0a, 0x10, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x75, 0x73, 0x65, 0x72, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x65, + 0x65, 0x70, 0x5f, 0x73, 0x63, 0x72, 0x61, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0a, 0x64, 0x65, 0x65, 0x70, 0x53, 0x63, 0x72, 0x61, 0x70, 0x65, 0x2a, 0x43, 0x0a, 0x0d, 0x50, + 0x6c, 0x75, 0x67, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0b, 0x0a, 0x07, + 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x54, 0x41, + 0x52, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, + 0x47, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x03, + 0x32, 0xb9, 0x01, 0x0a, 0x0d, 0x50, 0x6c, 0x75, 0x67, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x12, 0x2f, 0x0a, 0x09, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, + 0x11, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x1a, 0x0f, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x28, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x09, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x54, 0x61, 0x73, 0x6b, 0x1a, 0x0f, 0x2e, 0x50, + 0x6c, 0x75, 0x67, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x28, 0x0a, + 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x09, 0x2e, 0x50, 0x6c, + 0x75, 0x67, 0x54, 0x61, 0x73, 0x6b, 0x1a, 0x0f, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x54, 0x61, 0x73, + 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, + 0x0c, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, + 0x50, 0x6f, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x33, 0x5a, 0x31, + 0x67, 0x69, 0x74, 0x2e, 0x64, 0x72, 0x61, 0x67, 0x73, 0x65, 0x2e, 0x69, 0x74, 0x2f, 0x61, 0x6e, + 0x74, 0x68, 0x72, 0x6f, 0x76, 0x65, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x2d, 0x5b, 0x52, 0x45, 0x50, + 0x4c, 0x41, 0x43, 0x45, 0x5f, 0x4d, 0x45, 0x5d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x52, 0x50, + 0x43, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -289,26 +417,33 @@ func file_plug_proto_rawDescGZIP() []byte { } var file_plug_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_plug_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_plug_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_plug_proto_goTypes = []interface{}{ - (PlugTaskState)(0), // 0: PlugTaskState - (*PlugTaskStatus)(nil), // 1: PlugTaskStatus - (*PlugTask)(nil), // 2: PlugTask - (*PlugTaskCreation)(nil), // 3: PlugTaskCreation + (PlugTaskState)(0), // 0: PlugTaskState + (*PingRequest)(nil), // 1: PingRequest + (*PongResponse)(nil), // 2: PongResponse + (*PlugTaskStatus)(nil), // 3: PlugTaskStatus + (*PlugTask)(nil), // 4: PlugTask + (*PlugTaskCreation)(nil), // 5: PlugTaskCreation + (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp } var file_plug_proto_depIdxs = []int32{ - 0, // 0: PlugTaskStatus.task_state:type_name -> PlugTaskState - 3, // 1: PlugConnector.TaskStart:input_type -> PlugTaskCreation - 2, // 2: PlugConnector.TaskStatus:input_type -> PlugTask - 2, // 3: PlugConnector.TaskCancel:input_type -> PlugTask - 1, // 4: PlugConnector.TaskStart:output_type -> PlugTaskStatus - 1, // 5: PlugConnector.TaskStatus:output_type -> PlugTaskStatus - 1, // 6: PlugConnector.TaskCancel:output_type -> PlugTaskStatus - 4, // [4:7] is the sub-list for method output_type - 1, // [1:4] 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 + 6, // 0: PingRequest.timestamp:type_name -> google.protobuf.Timestamp + 6, // 1: PongResponse.timestamp:type_name -> google.protobuf.Timestamp + 0, // 2: PlugTaskStatus.task_state:type_name -> PlugTaskState + 5, // 3: PlugConnector.TaskStart:input_type -> PlugTaskCreation + 4, // 4: PlugConnector.TaskStatus:input_type -> PlugTask + 4, // 5: PlugConnector.TaskCancel:input_type -> PlugTask + 1, // 6: PlugConnector.Ping:input_type -> PingRequest + 3, // 7: PlugConnector.TaskStart:output_type -> PlugTaskStatus + 3, // 8: PlugConnector.TaskStatus:output_type -> PlugTaskStatus + 3, // 9: PlugConnector.TaskCancel:output_type -> PlugTaskStatus + 2, // 10: PlugConnector.Ping:output_type -> PongResponse + 7, // [7:11] is the sub-list for method output_type + 3, // [3:7] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_plug_proto_init() } @@ -318,7 +453,7 @@ func file_plug_proto_init() { } if !protoimpl.UnsafeEnabled { file_plug_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PlugTaskStatus); i { + switch v := v.(*PingRequest); i { case 0: return &v.state case 1: @@ -330,7 +465,7 @@ func file_plug_proto_init() { } } file_plug_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PlugTask); i { + switch v := v.(*PongResponse); i { case 0: return &v.state case 1: @@ -342,6 +477,30 @@ func file_plug_proto_init() { } } file_plug_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PlugTaskStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_plug_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PlugTask); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_plug_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PlugTaskCreation); i { case 0: return &v.state @@ -360,7 +519,7 @@ func file_plug_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_plug_proto_rawDesc, NumEnums: 1, - NumMessages: 3, + NumMessages: 5, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/grpc/plug_grpc.pb.go b/pkg/grpc/plug_grpc.pb.go index 8606ff9..b4dfb18 100644 --- a/pkg/grpc/plug_grpc.pb.go +++ b/pkg/grpc/plug_grpc.pb.go @@ -22,6 +22,7 @@ const ( PlugConnector_TaskStart_FullMethodName = "/PlugConnector/TaskStart" PlugConnector_TaskStatus_FullMethodName = "/PlugConnector/TaskStatus" PlugConnector_TaskCancel_FullMethodName = "/PlugConnector/TaskCancel" + PlugConnector_Ping_FullMethodName = "/PlugConnector/Ping" ) // PlugConnectorClient is the client API for PlugConnector service. @@ -31,6 +32,7 @@ type PlugConnectorClient interface { TaskStart(ctx context.Context, in *PlugTaskCreation, opts ...grpc.CallOption) (*PlugTaskStatus, error) TaskStatus(ctx context.Context, in *PlugTask, opts ...grpc.CallOption) (*PlugTaskStatus, error) TaskCancel(ctx context.Context, in *PlugTask, opts ...grpc.CallOption) (*PlugTaskStatus, error) + Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PongResponse, error) } type plugConnectorClient struct { @@ -68,6 +70,15 @@ func (c *plugConnectorClient) TaskCancel(ctx context.Context, in *PlugTask, opts return out, nil } +func (c *plugConnectorClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PongResponse, error) { + out := new(PongResponse) + err := c.cc.Invoke(ctx, PlugConnector_Ping_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // PlugConnectorServer is the server API for PlugConnector service. // All implementations must embed UnimplementedPlugConnectorServer // for forward compatibility @@ -75,6 +86,7 @@ type PlugConnectorServer interface { TaskStart(context.Context, *PlugTaskCreation) (*PlugTaskStatus, error) TaskStatus(context.Context, *PlugTask) (*PlugTaskStatus, error) TaskCancel(context.Context, *PlugTask) (*PlugTaskStatus, error) + Ping(context.Context, *PingRequest) (*PongResponse, error) mustEmbedUnimplementedPlugConnectorServer() } @@ -91,6 +103,9 @@ func (UnimplementedPlugConnectorServer) TaskStatus(context.Context, *PlugTask) ( func (UnimplementedPlugConnectorServer) TaskCancel(context.Context, *PlugTask) (*PlugTaskStatus, error) { return nil, status.Errorf(codes.Unimplemented, "method TaskCancel not implemented") } +func (UnimplementedPlugConnectorServer) Ping(context.Context, *PingRequest) (*PongResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") +} func (UnimplementedPlugConnectorServer) mustEmbedUnimplementedPlugConnectorServer() {} // UnsafePlugConnectorServer may be embedded to opt out of forward compatibility for this service. @@ -158,6 +173,24 @@ func _PlugConnector_TaskCancel_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _PlugConnector_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PlugConnectorServer).Ping(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PlugConnector_Ping_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PlugConnectorServer).Ping(ctx, req.(*PingRequest)) + } + return interceptor(ctx, in, info, handler) +} + // PlugConnector_ServiceDesc is the grpc.ServiceDesc for PlugConnector service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -177,6 +210,10 @@ var PlugConnector_ServiceDesc = grpc.ServiceDesc{ MethodName: "TaskCancel", Handler: _PlugConnector_TaskCancel_Handler, }, + { + MethodName: "Ping", + Handler: _PlugConnector_Ping_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "plug.proto",