|
@@ -0,0 +1,673 @@
|
|
|
|
+// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
|
|
+// versions:
|
|
|
|
+// protoc-gen-go v1.23.0
|
|
|
|
+// protoc v3.12.4
|
|
|
|
+// source: service.proto
|
|
|
|
+
|
|
|
|
+//声明 包名
|
|
|
|
+
|
|
|
|
+package proto
|
|
|
|
+
|
|
|
|
+import (
|
|
|
|
+ context "context"
|
|
|
|
+ proto "github.com/golang/protobuf/proto"
|
|
|
|
+ grpc "google.golang.org/grpc"
|
|
|
|
+ codes "google.golang.org/grpc/codes"
|
|
|
|
+ status "google.golang.org/grpc/status"
|
|
|
|
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
|
|
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
|
|
+ reflect "reflect"
|
|
|
|
+ sync "sync"
|
|
|
|
+)
|
|
|
|
+
|
|
|
|
+// This is a compile-time assertion that a sufficiently up-to-date version
|
|
|
|
+// of the legacy proto package is being used.
|
|
|
|
+const _ = proto.ProtoPackageIsVersion4
|
|
|
|
+
|
|
|
|
+//服务参数
|
|
|
|
+type ServiceMeta struct {
|
|
|
|
+ state protoimpl.MessageState
|
|
|
|
+ sizeCache protoimpl.SizeCache
|
|
|
|
+ unknownFields protoimpl.UnknownFields
|
|
|
|
+
|
|
|
|
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
|
|
+ Ip string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"`
|
|
|
|
+ Port int32 `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"`
|
|
|
|
+ Workers int32 `protobuf:"varint,4,opt,name=workers,proto3" json:"workers,omitempty"`
|
|
|
|
+ Balance int32 `protobuf:"varint,5,opt,name=balance,proto3" json:"balance,omitempty"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (x *ServiceMeta) Reset() {
|
|
|
|
+ *x = ServiceMeta{}
|
|
|
|
+ if protoimpl.UnsafeEnabled {
|
|
|
|
+ mi := &file_service_proto_msgTypes[0]
|
|
|
|
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
+ ms.StoreMessageInfo(mi)
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (x *ServiceMeta) String() string {
|
|
|
|
+ return protoimpl.X.MessageStringOf(x)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (*ServiceMeta) ProtoMessage() {}
|
|
|
|
+
|
|
|
|
+func (x *ServiceMeta) ProtoReflect() protoreflect.Message {
|
|
|
|
+ mi := &file_service_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 ServiceMeta.ProtoReflect.Descriptor instead.
|
|
|
|
+func (*ServiceMeta) Descriptor() ([]byte, []int) {
|
|
|
|
+ return file_service_proto_rawDescGZIP(), []int{0}
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (x *ServiceMeta) GetName() string {
|
|
|
|
+ if x != nil {
|
|
|
|
+ return x.Name
|
|
|
|
+ }
|
|
|
|
+ return ""
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (x *ServiceMeta) GetIp() string {
|
|
|
|
+ if x != nil {
|
|
|
|
+ return x.Ip
|
|
|
|
+ }
|
|
|
|
+ return ""
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (x *ServiceMeta) GetPort() int32 {
|
|
|
|
+ if x != nil {
|
|
|
|
+ return x.Port
|
|
|
|
+ }
|
|
|
|
+ return 0
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (x *ServiceMeta) GetWorkers() int32 {
|
|
|
|
+ if x != nil {
|
|
|
|
+ return x.Workers
|
|
|
|
+ }
|
|
|
|
+ return 0
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (x *ServiceMeta) GetBalance() int32 {
|
|
|
|
+ if x != nil {
|
|
|
|
+ return x.Balance
|
|
|
|
+ }
|
|
|
|
+ return 0
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+//标准字符串返回结果
|
|
|
|
+type StringRepData struct {
|
|
|
|
+ state protoimpl.MessageState
|
|
|
|
+ sizeCache protoimpl.SizeCache
|
|
|
|
+ unknownFields protoimpl.UnknownFields
|
|
|
|
+
|
|
|
|
+ Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (x *StringRepData) Reset() {
|
|
|
|
+ *x = StringRepData{}
|
|
|
|
+ if protoimpl.UnsafeEnabled {
|
|
|
|
+ mi := &file_service_proto_msgTypes[1]
|
|
|
|
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
+ ms.StoreMessageInfo(mi)
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (x *StringRepData) String() string {
|
|
|
|
+ return protoimpl.X.MessageStringOf(x)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (*StringRepData) ProtoMessage() {}
|
|
|
|
+
|
|
|
|
+func (x *StringRepData) ProtoReflect() protoreflect.Message {
|
|
|
|
+ mi := &file_service_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 StringRepData.ProtoReflect.Descriptor instead.
|
|
|
|
+func (*StringRepData) Descriptor() ([]byte, []int) {
|
|
|
|
+ return file_service_proto_rawDescGZIP(), []int{1}
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (x *StringRepData) GetData() string {
|
|
|
|
+ if x != nil {
|
|
|
|
+ return x.Data
|
|
|
|
+ }
|
|
|
|
+ return ""
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+//标准字符串请求
|
|
|
|
+type StringReqData struct {
|
|
|
|
+ state protoimpl.MessageState
|
|
|
|
+ sizeCache protoimpl.SizeCache
|
|
|
|
+ unknownFields protoimpl.UnknownFields
|
|
|
|
+
|
|
|
|
+ Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (x *StringReqData) Reset() {
|
|
|
|
+ *x = StringReqData{}
|
|
|
|
+ if protoimpl.UnsafeEnabled {
|
|
|
|
+ mi := &file_service_proto_msgTypes[2]
|
|
|
|
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
+ ms.StoreMessageInfo(mi)
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (x *StringReqData) String() string {
|
|
|
|
+ return protoimpl.X.MessageStringOf(x)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (*StringReqData) ProtoMessage() {}
|
|
|
|
+
|
|
|
|
+func (x *StringReqData) ProtoReflect() protoreflect.Message {
|
|
|
|
+ mi := &file_service_proto_msgTypes[2]
|
|
|
|
+ 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 StringReqData.ProtoReflect.Descriptor instead.
|
|
|
|
+func (*StringReqData) Descriptor() ([]byte, []int) {
|
|
|
|
+ return file_service_proto_rawDescGZIP(), []int{2}
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (x *StringReqData) GetData() string {
|
|
|
|
+ if x != nil {
|
|
|
|
+ return x.Data
|
|
|
|
+ }
|
|
|
|
+ return ""
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+//
|
|
|
|
+type ApplyReqData struct {
|
|
|
|
+ state protoimpl.MessageState
|
|
|
|
+ sizeCache protoimpl.SizeCache
|
|
|
|
+ unknownFields protoimpl.UnknownFields
|
|
|
|
+
|
|
|
|
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
|
|
+ Balance int32 `protobuf:"varint,2,opt,name=balance,proto3" json:"balance,omitempty"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (x *ApplyReqData) Reset() {
|
|
|
|
+ *x = ApplyReqData{}
|
|
|
|
+ if protoimpl.UnsafeEnabled {
|
|
|
|
+ mi := &file_service_proto_msgTypes[3]
|
|
|
|
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
+ ms.StoreMessageInfo(mi)
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (x *ApplyReqData) String() string {
|
|
|
|
+ return protoimpl.X.MessageStringOf(x)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (*ApplyReqData) ProtoMessage() {}
|
|
|
|
+
|
|
|
|
+func (x *ApplyReqData) ProtoReflect() protoreflect.Message {
|
|
|
|
+ mi := &file_service_proto_msgTypes[3]
|
|
|
|
+ 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 ApplyReqData.ProtoReflect.Descriptor instead.
|
|
|
|
+func (*ApplyReqData) Descriptor() ([]byte, []int) {
|
|
|
|
+ return file_service_proto_rawDescGZIP(), []int{3}
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (x *ApplyReqData) GetName() string {
|
|
|
|
+ if x != nil {
|
|
|
|
+ return x.Name
|
|
|
|
+ }
|
|
|
|
+ return ""
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (x *ApplyReqData) GetBalance() int32 {
|
|
|
|
+ if x != nil {
|
|
|
|
+ return x.Balance
|
|
|
|
+ }
|
|
|
|
+ return 0
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type ApplyRepData struct {
|
|
|
|
+ state protoimpl.MessageState
|
|
|
|
+ sizeCache protoimpl.SizeCache
|
|
|
|
+ unknownFields protoimpl.UnknownFields
|
|
|
|
+
|
|
|
|
+ Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
|
|
|
|
+ ResourceId string `protobuf:"bytes,2,opt,name=resourceId,proto3" json:"resourceId,omitempty"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (x *ApplyRepData) Reset() {
|
|
|
|
+ *x = ApplyRepData{}
|
|
|
|
+ if protoimpl.UnsafeEnabled {
|
|
|
|
+ mi := &file_service_proto_msgTypes[4]
|
|
|
|
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
+ ms.StoreMessageInfo(mi)
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (x *ApplyRepData) String() string {
|
|
|
|
+ return protoimpl.X.MessageStringOf(x)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (*ApplyRepData) ProtoMessage() {}
|
|
|
|
+
|
|
|
|
+func (x *ApplyRepData) ProtoReflect() protoreflect.Message {
|
|
|
|
+ mi := &file_service_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 ApplyRepData.ProtoReflect.Descriptor instead.
|
|
|
|
+func (*ApplyRepData) Descriptor() ([]byte, []int) {
|
|
|
|
+ return file_service_proto_rawDescGZIP(), []int{4}
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (x *ApplyRepData) GetAddr() string {
|
|
|
|
+ if x != nil {
|
|
|
|
+ return x.Addr
|
|
|
|
+ }
|
|
|
|
+ return ""
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (x *ApplyRepData) GetResourceId() string {
|
|
|
|
+ if x != nil {
|
|
|
|
+ return x.ResourceId
|
|
|
|
+ }
|
|
|
|
+ return ""
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+var File_service_proto protoreflect.FileDescriptor
|
|
|
|
+
|
|
|
|
+var file_service_proto_rawDesc = []byte{
|
|
|
|
+ 0x0a, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
|
|
|
|
+ 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x79, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
|
|
|
|
+ 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
|
|
|
|
+ 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18,
|
|
|
|
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72,
|
|
|
|
+ 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a,
|
|
|
|
+ 0x07, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07,
|
|
|
|
+ 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e,
|
|
|
|
+ 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63,
|
|
|
|
+ 0x65, 0x22, 0x23, 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x44, 0x61,
|
|
|
|
+ 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
|
|
|
+ 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x23, 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67,
|
|
|
|
+ 0x52, 0x65, 0x71, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18,
|
|
|
|
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3c, 0x0a, 0x0c, 0x41,
|
|
|
|
+ 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e,
|
|
|
|
+ 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
|
|
|
|
+ 0x18, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
|
|
|
|
+ 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x42, 0x0a, 0x0c, 0x41, 0x70, 0x70,
|
|
|
|
+ 0x6c, 0x79, 0x52, 0x65, 0x70, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64,
|
|
|
|
+ 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x1e, 0x0a,
|
|
|
|
+ 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
|
|
|
|
+ 0x09, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x32, 0xe5, 0x01,
|
|
|
|
+ 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x07, 0x52, 0x65, 0x67,
|
|
|
|
+ 0x69, 0x73, 0x74, 0x65, 0x12, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x72,
|
|
|
|
+ 0x76, 0x69, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x1a, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
|
|
|
+ 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x44, 0x61, 0x74, 0x61, 0x22, 0x00,
|
|
|
|
+ 0x12, 0x35, 0x0a, 0x07, 0x44, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x12, 0x2e, 0x70, 0x72,
|
|
|
|
+ 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x1a,
|
|
|
|
+ 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x65,
|
|
|
|
+ 0x70, 0x44, 0x61, 0x74, 0x61, 0x22, 0x00, 0x12, 0x33, 0x0a, 0x05, 0x41, 0x70, 0x70, 0x6c, 0x79,
|
|
|
|
+ 0x12, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65,
|
|
|
|
+ 0x71, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x70,
|
|
|
|
+ 0x70, 0x6c, 0x79, 0x52, 0x65, 0x70, 0x44, 0x61, 0x74, 0x61, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x07,
|
|
|
|
+ 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x12, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
|
|
|
|
+ 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x14, 0x2e,
|
|
|
|
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x44,
|
|
|
|
+ 0x61, 0x74, 0x61, 0x22, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+var (
|
|
|
|
+ file_service_proto_rawDescOnce sync.Once
|
|
|
|
+ file_service_proto_rawDescData = file_service_proto_rawDesc
|
|
|
|
+)
|
|
|
|
+
|
|
|
|
+func file_service_proto_rawDescGZIP() []byte {
|
|
|
|
+ file_service_proto_rawDescOnce.Do(func() {
|
|
|
|
+ file_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_proto_rawDescData)
|
|
|
|
+ })
|
|
|
|
+ return file_service_proto_rawDescData
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+var file_service_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
|
|
|
+var file_service_proto_goTypes = []interface{}{
|
|
|
|
+ (*ServiceMeta)(nil), // 0: proto.ServiceMeta
|
|
|
|
+ (*StringRepData)(nil), // 1: proto.StringRepData
|
|
|
|
+ (*StringReqData)(nil), // 2: proto.StringReqData
|
|
|
|
+ (*ApplyReqData)(nil), // 3: proto.ApplyReqData
|
|
|
|
+ (*ApplyRepData)(nil), // 4: proto.ApplyRepData
|
|
|
|
+}
|
|
|
|
+var file_service_proto_depIdxs = []int32{
|
|
|
|
+ 0, // 0: proto.Service.Registe:input_type -> proto.ServiceMeta
|
|
|
|
+ 0, // 1: proto.Service.Destory:input_type -> proto.ServiceMeta
|
|
|
|
+ 3, // 2: proto.Service.Apply:input_type -> proto.ApplyReqData
|
|
|
|
+ 2, // 3: proto.Service.Release:input_type -> proto.StringReqData
|
|
|
|
+ 1, // 4: proto.Service.Registe:output_type -> proto.StringRepData
|
|
|
|
+ 1, // 5: proto.Service.Destory:output_type -> proto.StringRepData
|
|
|
|
+ 4, // 6: proto.Service.Apply:output_type -> proto.ApplyRepData
|
|
|
|
+ 1, // 7: proto.Service.Release:output_type -> proto.StringRepData
|
|
|
|
+ 4, // [4:8] is the sub-list for method output_type
|
|
|
|
+ 0, // [0:4] 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
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func init() { file_service_proto_init() }
|
|
|
|
+func file_service_proto_init() {
|
|
|
|
+ if File_service_proto != nil {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if !protoimpl.UnsafeEnabled {
|
|
|
|
+ file_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
|
|
|
+ switch v := v.(*ServiceMeta); i {
|
|
|
|
+ case 0:
|
|
|
|
+ return &v.state
|
|
|
|
+ case 1:
|
|
|
|
+ return &v.sizeCache
|
|
|
|
+ case 2:
|
|
|
|
+ return &v.unknownFields
|
|
|
|
+ default:
|
|
|
|
+ return nil
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ file_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
|
|
|
+ switch v := v.(*StringRepData); i {
|
|
|
|
+ case 0:
|
|
|
|
+ return &v.state
|
|
|
|
+ case 1:
|
|
|
|
+ return &v.sizeCache
|
|
|
|
+ case 2:
|
|
|
|
+ return &v.unknownFields
|
|
|
|
+ default:
|
|
|
|
+ return nil
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ file_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
|
|
|
+ switch v := v.(*StringReqData); i {
|
|
|
|
+ case 0:
|
|
|
|
+ return &v.state
|
|
|
|
+ case 1:
|
|
|
|
+ return &v.sizeCache
|
|
|
|
+ case 2:
|
|
|
|
+ return &v.unknownFields
|
|
|
|
+ default:
|
|
|
|
+ return nil
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ file_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
|
|
|
+ switch v := v.(*ApplyReqData); i {
|
|
|
|
+ case 0:
|
|
|
|
+ return &v.state
|
|
|
|
+ case 1:
|
|
|
|
+ return &v.sizeCache
|
|
|
|
+ case 2:
|
|
|
|
+ return &v.unknownFields
|
|
|
|
+ default:
|
|
|
|
+ return nil
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ file_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
|
|
|
+ switch v := v.(*ApplyRepData); i {
|
|
|
|
+ case 0:
|
|
|
|
+ return &v.state
|
|
|
|
+ case 1:
|
|
|
|
+ return &v.sizeCache
|
|
|
|
+ case 2:
|
|
|
|
+ return &v.unknownFields
|
|
|
|
+ default:
|
|
|
|
+ return nil
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ type x struct{}
|
|
|
|
+ out := protoimpl.TypeBuilder{
|
|
|
|
+ File: protoimpl.DescBuilder{
|
|
|
|
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
|
|
+ RawDescriptor: file_service_proto_rawDesc,
|
|
|
|
+ NumEnums: 0,
|
|
|
|
+ NumMessages: 5,
|
|
|
|
+ NumExtensions: 0,
|
|
|
|
+ NumServices: 1,
|
|
|
|
+ },
|
|
|
|
+ GoTypes: file_service_proto_goTypes,
|
|
|
|
+ DependencyIndexes: file_service_proto_depIdxs,
|
|
|
|
+ MessageInfos: file_service_proto_msgTypes,
|
|
|
|
+ }.Build()
|
|
|
|
+ File_service_proto = out.File
|
|
|
|
+ file_service_proto_rawDesc = nil
|
|
|
|
+ file_service_proto_goTypes = nil
|
|
|
|
+ file_service_proto_depIdxs = nil
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
+var _ context.Context
|
|
|
|
+var _ grpc.ClientConnInterface
|
|
|
|
+
|
|
|
|
+// This is a compile-time assertion to ensure that this generated file
|
|
|
|
+// is compatible with the grpc package it is being compiled against.
|
|
|
|
+const _ = grpc.SupportPackageIsVersion6
|
|
|
|
+
|
|
|
|
+// ServiceClient is the client API for Service service.
|
|
|
|
+//
|
|
|
|
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
|
|
+type ServiceClient interface {
|
|
|
|
+ //注册服务
|
|
|
|
+ Registe(ctx context.Context, in *ServiceMeta, opts ...grpc.CallOption) (*StringRepData, error)
|
|
|
|
+ //注销服务
|
|
|
|
+ Destory(ctx context.Context, in *ServiceMeta, opts ...grpc.CallOption) (*StringRepData, error)
|
|
|
|
+ //申请服务
|
|
|
|
+ Apply(ctx context.Context, in *ApplyReqData, opts ...grpc.CallOption) (*ApplyRepData, error)
|
|
|
|
+ //释放服务
|
|
|
|
+ Release(ctx context.Context, in *StringReqData, opts ...grpc.CallOption) (*StringRepData, error)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type serviceClient struct {
|
|
|
|
+ cc grpc.ClientConnInterface
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient {
|
|
|
|
+ return &serviceClient{cc}
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (c *serviceClient) Registe(ctx context.Context, in *ServiceMeta, opts ...grpc.CallOption) (*StringRepData, error) {
|
|
|
|
+ out := new(StringRepData)
|
|
|
|
+ err := c.cc.Invoke(ctx, "/proto.Service/Registe", in, out, opts...)
|
|
|
|
+ if err != nil {
|
|
|
|
+ return nil, err
|
|
|
|
+ }
|
|
|
|
+ return out, nil
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (c *serviceClient) Destory(ctx context.Context, in *ServiceMeta, opts ...grpc.CallOption) (*StringRepData, error) {
|
|
|
|
+ out := new(StringRepData)
|
|
|
|
+ err := c.cc.Invoke(ctx, "/proto.Service/Destory", in, out, opts...)
|
|
|
|
+ if err != nil {
|
|
|
|
+ return nil, err
|
|
|
|
+ }
|
|
|
|
+ return out, nil
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (c *serviceClient) Apply(ctx context.Context, in *ApplyReqData, opts ...grpc.CallOption) (*ApplyRepData, error) {
|
|
|
|
+ out := new(ApplyRepData)
|
|
|
|
+ err := c.cc.Invoke(ctx, "/proto.Service/Apply", in, out, opts...)
|
|
|
|
+ if err != nil {
|
|
|
|
+ return nil, err
|
|
|
|
+ }
|
|
|
|
+ return out, nil
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (c *serviceClient) Release(ctx context.Context, in *StringReqData, opts ...grpc.CallOption) (*StringRepData, error) {
|
|
|
|
+ out := new(StringRepData)
|
|
|
|
+ err := c.cc.Invoke(ctx, "/proto.Service/Release", in, out, opts...)
|
|
|
|
+ if err != nil {
|
|
|
|
+ return nil, err
|
|
|
|
+ }
|
|
|
|
+ return out, nil
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// ServiceServer is the server API for Service service.
|
|
|
|
+type ServiceServer interface {
|
|
|
|
+ //注册服务
|
|
|
|
+ Registe(context.Context, *ServiceMeta) (*StringRepData, error)
|
|
|
|
+ //注销服务
|
|
|
|
+ Destory(context.Context, *ServiceMeta) (*StringRepData, error)
|
|
|
|
+ //申请服务
|
|
|
|
+ Apply(context.Context, *ApplyReqData) (*ApplyRepData, error)
|
|
|
|
+ //释放服务
|
|
|
|
+ Release(context.Context, *StringReqData) (*StringRepData, error)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// UnimplementedServiceServer can be embedded to have forward compatible implementations.
|
|
|
|
+type UnimplementedServiceServer struct {
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (*UnimplementedServiceServer) Registe(context.Context, *ServiceMeta) (*StringRepData, error) {
|
|
|
|
+ return nil, status.Errorf(codes.Unimplemented, "method Registe not implemented")
|
|
|
|
+}
|
|
|
|
+func (*UnimplementedServiceServer) Destory(context.Context, *ServiceMeta) (*StringRepData, error) {
|
|
|
|
+ return nil, status.Errorf(codes.Unimplemented, "method Destory not implemented")
|
|
|
|
+}
|
|
|
|
+func (*UnimplementedServiceServer) Apply(context.Context, *ApplyReqData) (*ApplyRepData, error) {
|
|
|
|
+ return nil, status.Errorf(codes.Unimplemented, "method Apply not implemented")
|
|
|
|
+}
|
|
|
|
+func (*UnimplementedServiceServer) Release(context.Context, *StringReqData) (*StringRepData, error) {
|
|
|
|
+ return nil, status.Errorf(codes.Unimplemented, "method Release not implemented")
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func RegisterServiceServer(s *grpc.Server, srv ServiceServer) {
|
|
|
|
+ s.RegisterService(&_Service_serviceDesc, srv)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func _Service_Registe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
+ in := new(ServiceMeta)
|
|
|
|
+ if err := dec(in); err != nil {
|
|
|
|
+ return nil, err
|
|
|
|
+ }
|
|
|
|
+ if interceptor == nil {
|
|
|
|
+ return srv.(ServiceServer).Registe(ctx, in)
|
|
|
|
+ }
|
|
|
|
+ info := &grpc.UnaryServerInfo{
|
|
|
|
+ Server: srv,
|
|
|
|
+ FullMethod: "/proto.Service/Registe",
|
|
|
|
+ }
|
|
|
|
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
+ return srv.(ServiceServer).Registe(ctx, req.(*ServiceMeta))
|
|
|
|
+ }
|
|
|
|
+ return interceptor(ctx, in, info, handler)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func _Service_Destory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
+ in := new(ServiceMeta)
|
|
|
|
+ if err := dec(in); err != nil {
|
|
|
|
+ return nil, err
|
|
|
|
+ }
|
|
|
|
+ if interceptor == nil {
|
|
|
|
+ return srv.(ServiceServer).Destory(ctx, in)
|
|
|
|
+ }
|
|
|
|
+ info := &grpc.UnaryServerInfo{
|
|
|
|
+ Server: srv,
|
|
|
|
+ FullMethod: "/proto.Service/Destory",
|
|
|
|
+ }
|
|
|
|
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
+ return srv.(ServiceServer).Destory(ctx, req.(*ServiceMeta))
|
|
|
|
+ }
|
|
|
|
+ return interceptor(ctx, in, info, handler)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func _Service_Apply_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
+ in := new(ApplyReqData)
|
|
|
|
+ if err := dec(in); err != nil {
|
|
|
|
+ return nil, err
|
|
|
|
+ }
|
|
|
|
+ if interceptor == nil {
|
|
|
|
+ return srv.(ServiceServer).Apply(ctx, in)
|
|
|
|
+ }
|
|
|
|
+ info := &grpc.UnaryServerInfo{
|
|
|
|
+ Server: srv,
|
|
|
|
+ FullMethod: "/proto.Service/Apply",
|
|
|
|
+ }
|
|
|
|
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
+ return srv.(ServiceServer).Apply(ctx, req.(*ApplyReqData))
|
|
|
|
+ }
|
|
|
|
+ return interceptor(ctx, in, info, handler)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func _Service_Release_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
+ in := new(StringReqData)
|
|
|
|
+ if err := dec(in); err != nil {
|
|
|
|
+ return nil, err
|
|
|
|
+ }
|
|
|
|
+ if interceptor == nil {
|
|
|
|
+ return srv.(ServiceServer).Release(ctx, in)
|
|
|
|
+ }
|
|
|
|
+ info := &grpc.UnaryServerInfo{
|
|
|
|
+ Server: srv,
|
|
|
|
+ FullMethod: "/proto.Service/Release",
|
|
|
|
+ }
|
|
|
|
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
+ return srv.(ServiceServer).Release(ctx, req.(*StringReqData))
|
|
|
|
+ }
|
|
|
|
+ return interceptor(ctx, in, info, handler)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+var _Service_serviceDesc = grpc.ServiceDesc{
|
|
|
|
+ ServiceName: "proto.Service",
|
|
|
|
+ HandlerType: (*ServiceServer)(nil),
|
|
|
|
+ Methods: []grpc.MethodDesc{
|
|
|
|
+ {
|
|
|
|
+ MethodName: "Registe",
|
|
|
|
+ Handler: _Service_Registe_Handler,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ MethodName: "Destory",
|
|
|
|
+ Handler: _Service_Destory_Handler,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ MethodName: "Apply",
|
|
|
|
+ Handler: _Service_Apply_Handler,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ MethodName: "Release",
|
|
|
|
+ Handler: _Service_Release_Handler,
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ Streams: []grpc.StreamDesc{},
|
|
|
|
+ Metadata: "service.proto",
|
|
|
|
+}
|