refactor: updated grpc services

This commit is contained in:
Marvin Zhang
2024-10-30 18:42:23 +08:00
parent 789f71fd80
commit fa1433007f
64 changed files with 2704 additions and 5132 deletions

View File

@@ -20,16 +20,57 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type NodeServiceSubscribeCode int32
const (
NodeServiceSubscribeCode_PING NodeServiceSubscribeCode = 0
)
// Enum value maps for NodeServiceSubscribeCode.
var (
NodeServiceSubscribeCode_name = map[int32]string{
0: "PING",
}
NodeServiceSubscribeCode_value = map[string]int32{
"PING": 0,
}
)
func (x NodeServiceSubscribeCode) Enum() *NodeServiceSubscribeCode {
p := new(NodeServiceSubscribeCode)
*p = x
return p
}
func (x NodeServiceSubscribeCode) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (NodeServiceSubscribeCode) Descriptor() protoreflect.EnumDescriptor {
return file_services_node_service_proto_enumTypes[0].Descriptor()
}
func (NodeServiceSubscribeCode) Type() protoreflect.EnumType {
return &file_services_node_service_proto_enumTypes[0]
}
func (x NodeServiceSubscribeCode) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use NodeServiceSubscribeCode.Descriptor instead.
func (NodeServiceSubscribeCode) EnumDescriptor() ([]byte, []int) {
return file_services_node_service_proto_rawDescGZIP(), []int{0}
}
type NodeServiceRegisterRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
IsMaster bool `protobuf:"varint,3,opt,name=isMaster,proto3" json:"isMaster,omitempty"`
AuthKey string `protobuf:"bytes,4,opt,name=authKey,proto3" json:"authKey,omitempty"`
MaxRunners int32 `protobuf:"varint,5,opt,name=maxRunners,proto3" json:"maxRunners,omitempty"`
NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"`
NodeName string `protobuf:"bytes,2,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"`
MaxRunners int32 `protobuf:"varint,3,opt,name=max_runners,json=maxRunners,proto3" json:"max_runners,omitempty"`
}
func (x *NodeServiceRegisterRequest) Reset() {
@@ -64,30 +105,16 @@ func (*NodeServiceRegisterRequest) Descriptor() ([]byte, []int) {
return file_services_node_service_proto_rawDescGZIP(), []int{0}
}
func (x *NodeServiceRegisterRequest) GetKey() string {
func (x *NodeServiceRegisterRequest) GetNodeKey() string {
if x != nil {
return x.Key
return x.NodeKey
}
return ""
}
func (x *NodeServiceRegisterRequest) GetName() string {
func (x *NodeServiceRegisterRequest) GetNodeName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NodeServiceRegisterRequest) GetIsMaster() bool {
if x != nil {
return x.IsMaster
}
return false
}
func (x *NodeServiceRegisterRequest) GetAuthKey() string {
if x != nil {
return x.AuthKey
return x.NodeName
}
return ""
}
@@ -104,7 +131,7 @@ type NodeServiceSendHeartbeatRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"`
}
func (x *NodeServiceSendHeartbeatRequest) Reset() {
@@ -139,53 +166,153 @@ func (*NodeServiceSendHeartbeatRequest) Descriptor() ([]byte, []int) {
return file_services_node_service_proto_rawDescGZIP(), []int{1}
}
func (x *NodeServiceSendHeartbeatRequest) GetKey() string {
func (x *NodeServiceSendHeartbeatRequest) GetNodeKey() string {
if x != nil {
return x.Key
return x.NodeKey
}
return ""
}
type NodeServiceSubscribeRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"`
}
func (x *NodeServiceSubscribeRequest) Reset() {
*x = NodeServiceSubscribeRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_services_node_service_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NodeServiceSubscribeRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NodeServiceSubscribeRequest) ProtoMessage() {}
func (x *NodeServiceSubscribeRequest) ProtoReflect() protoreflect.Message {
mi := &file_services_node_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 NodeServiceSubscribeRequest.ProtoReflect.Descriptor instead.
func (*NodeServiceSubscribeRequest) Descriptor() ([]byte, []int) {
return file_services_node_service_proto_rawDescGZIP(), []int{2}
}
func (x *NodeServiceSubscribeRequest) GetNodeKey() string {
if x != nil {
return x.NodeKey
}
return ""
}
type NodeServiceSubscribeResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Code NodeServiceSubscribeCode `protobuf:"varint,1,opt,name=code,proto3,enum=grpc.NodeServiceSubscribeCode" json:"code,omitempty"`
}
func (x *NodeServiceSubscribeResponse) Reset() {
*x = NodeServiceSubscribeResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_services_node_service_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NodeServiceSubscribeResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NodeServiceSubscribeResponse) ProtoMessage() {}
func (x *NodeServiceSubscribeResponse) ProtoReflect() protoreflect.Message {
mi := &file_services_node_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 NodeServiceSubscribeResponse.ProtoReflect.Descriptor instead.
func (*NodeServiceSubscribeResponse) Descriptor() ([]byte, []int) {
return file_services_node_service_proto_rawDescGZIP(), []int{3}
}
func (x *NodeServiceSubscribeResponse) GetCode() NodeServiceSubscribeCode {
if x != nil {
return x.Code
}
return NodeServiceSubscribeCode_PING
}
var File_services_node_service_proto protoreflect.FileDescriptor
var file_services_node_service_proto_rawDesc = []byte{
0x0a, 0x1b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x5f,
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x67,
0x72, 0x70, 0x63, 0x1a, 0x14, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x72, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x65, 0x6e, 0x74, 0x69, 0x74,
0x79, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x1a, 0x1b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f,
0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x98, 0x01,
0x0a, 0x1a, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x67,
0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03,
0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x12,
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x18, 0x03,
0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x12, 0x18,
0x0a, 0x07, 0x61, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
0x07, 0x61, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x52,
0x75, 0x6e, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6d, 0x61,
0x78, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x33, 0x0a, 0x1f, 0x4e, 0x6f, 0x64, 0x65,
0x72, 0x70, 0x63, 0x1a, 0x15, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x72, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x75, 0x0a, 0x1a, 0x4e, 0x6f,
0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65,
0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65,
0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65,
0x4b, 0x65, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65,
0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x73, 0x18,
0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72,
0x73, 0x22, 0x3c, 0x0a, 0x1f, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x53, 0x65, 0x6e, 0x64, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6b, 0x65, 0x79,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x22,
0x38, 0x0a, 0x1b, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x75,
0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19,
0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x52, 0x0a, 0x1c, 0x4e, 0x6f, 0x64,
0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62,
0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x04, 0x63, 0x6f, 0x64,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4e,
0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72,
0x69, 0x62, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x2a, 0x24, 0x0a,
0x18, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x75, 0x62, 0x73,
0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x50, 0x49, 0x4e,
0x47, 0x10, 0x00, 0x32, 0xef, 0x01, 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x12, 0x3e, 0x0a, 0x08, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12,
0x20, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x0d, 0x53, 0x65, 0x6e, 0x64, 0x48, 0x65, 0x61, 0x72, 0x74,
0x62, 0x65, 0x61, 0x74, 0x12, 0x25, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x6f, 0x64, 0x65,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x65, 0x6e, 0x64, 0x48, 0x65, 0x61, 0x72, 0x74,
0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b,
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x32, 0xfc, 0x01,
0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3e, 0x0a,
0x08, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x20, 0x2e, 0x67, 0x72, 0x70, 0x63,
0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69,
0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x48, 0x0a,
0x0d, 0x53, 0x65, 0x6e, 0x64, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x25,
0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x53, 0x65, 0x6e, 0x64, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x33, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63,
0x72, 0x69, 0x62, 0x65, 0x12, 0x0d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61,
0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x2e, 0x0a, 0x0b,
0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x0d, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72, 0x70,
0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x08, 0x5a, 0x06,
0x2e, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x67, 0x72,
0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x56, 0x0a,
0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x21, 0x2e, 0x67, 0x72, 0x70,
0x63, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x75, 0x62,
0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e,
0x67, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x00, 0x30, 0x01, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -200,28 +327,29 @@ func file_services_node_service_proto_rawDescGZIP() []byte {
return file_services_node_service_proto_rawDescData
}
var file_services_node_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_services_node_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_services_node_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_services_node_service_proto_goTypes = []any{
(*NodeServiceRegisterRequest)(nil), // 0: grpc.NodeServiceRegisterRequest
(*NodeServiceSendHeartbeatRequest)(nil), // 1: grpc.NodeServiceSendHeartbeatRequest
(*Request)(nil), // 2: grpc.Request
(*Response)(nil), // 3: grpc.Response
(*StreamMessage)(nil), // 4: grpc.StreamMessage
(NodeServiceSubscribeCode)(0), // 0: grpc.NodeServiceSubscribeCode
(*NodeServiceRegisterRequest)(nil), // 1: grpc.NodeServiceRegisterRequest
(*NodeServiceSendHeartbeatRequest)(nil), // 2: grpc.NodeServiceSendHeartbeatRequest
(*NodeServiceSubscribeRequest)(nil), // 3: grpc.NodeServiceSubscribeRequest
(*NodeServiceSubscribeResponse)(nil), // 4: grpc.NodeServiceSubscribeResponse
(*Response)(nil), // 5: grpc.Response
}
var file_services_node_service_proto_depIdxs = []int32{
0, // 0: grpc.NodeService.Register:input_type -> grpc.NodeServiceRegisterRequest
1, // 1: grpc.NodeService.SendHeartbeat:input_type -> grpc.NodeServiceSendHeartbeatRequest
2, // 2: grpc.NodeService.Subscribe:input_type -> grpc.Request
2, // 3: grpc.NodeService.Unsubscribe:input_type -> grpc.Request
3, // 4: grpc.NodeService.Register:output_type -> grpc.Response
3, // 5: grpc.NodeService.SendHeartbeat:output_type -> grpc.Response
4, // 6: grpc.NodeService.Subscribe:output_type -> grpc.StreamMessage
3, // 7: grpc.NodeService.Unsubscribe:output_type -> grpc.Response
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
0, // 0: grpc.NodeServiceSubscribeResponse.code:type_name -> grpc.NodeServiceSubscribeCode
1, // 1: grpc.NodeService.Register:input_type -> grpc.NodeServiceRegisterRequest
2, // 2: grpc.NodeService.SendHeartbeat:input_type -> grpc.NodeServiceSendHeartbeatRequest
3, // 3: grpc.NodeService.Subscribe:input_type -> grpc.NodeServiceSubscribeRequest
5, // 4: grpc.NodeService.Register:output_type -> grpc.Response
5, // 5: grpc.NodeService.SendHeartbeat:output_type -> grpc.Response
4, // 6: grpc.NodeService.Subscribe:output_type -> grpc.NodeServiceSubscribeResponse
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
}
func init() { file_services_node_service_proto_init() }
@@ -229,9 +357,7 @@ func file_services_node_service_proto_init() {
if File_services_node_service_proto != nil {
return
}
file_entity_request_proto_init()
file_entity_response_proto_init()
file_entity_stream_message_proto_init()
if !protoimpl.UnsafeEnabled {
file_services_node_service_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*NodeServiceRegisterRequest); i {
@@ -257,19 +383,44 @@ func file_services_node_service_proto_init() {
return nil
}
}
file_services_node_service_proto_msgTypes[2].Exporter = func(v any, i int) any {
switch v := v.(*NodeServiceSubscribeRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_services_node_service_proto_msgTypes[3].Exporter = func(v any, i int) any {
switch v := v.(*NodeServiceSubscribeResponse); 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_services_node_service_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumEnums: 1,
NumMessages: 4,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_services_node_service_proto_goTypes,
DependencyIndexes: file_services_node_service_proto_depIdxs,
EnumInfos: file_services_node_service_proto_enumTypes,
MessageInfos: file_services_node_service_proto_msgTypes,
}.Build()
File_services_node_service_proto = out.File