增加获取当前API节点信息API/增加修改节点API节点地址消息类型

This commit is contained in:
GoEdgeLab
2021-11-21 09:41:38 +08:00
parent 782e2693de
commit 884fad7a86
4 changed files with 655 additions and 365 deletions

View File

@@ -11,15 +11,16 @@ const (
MessageCodeCleanCache MessageCode = "cleanCache" // 清理缓存 MessageCodeCleanCache MessageCode = "cleanCache" // 清理缓存
MessageCodePreheatCache MessageCode = "preheatCache" // 预热缓存 MessageCodePreheatCache MessageCode = "preheatCache" // 预热缓存
MessageCodeCheckSystemdService MessageCode = "checkSystemdService" // 检查Systemd服务 MessageCodeCheckSystemdService MessageCode = "checkSystemdService" // 检查Systemd服务
MessageCodeNewNodeTask MessageCode = "NewNodeTask" // 有新的节点任务产生 MessageCodeNewNodeTask MessageCode = "newNodeTask" // 有新的节点任务产生
MessageCodeChangeAPINode MessageCode = "changeAPINode" // 改变新的API节点
) )
// 连接API节点成功 // ConnectedAPINodeMessage 连接API节点成功
type ConnectedAPINodeMessage struct { type ConnectedAPINodeMessage struct {
APINodeId int64 `json:"apiNodeId"` APINodeId int64 `json:"apiNodeId"`
} }
// 写入缓存 // WriteCacheMessage 写入缓存
type WriteCacheMessage struct { type WriteCacheMessage struct {
CachePolicyJSON []byte `json:"cachePolicyJSON"` CachePolicyJSON []byte `json:"cachePolicyJSON"`
Key string `json:"key"` Key string `json:"key"`
@@ -27,13 +28,13 @@ type WriteCacheMessage struct {
LifeSeconds int64 `json:"lifeSeconds"` LifeSeconds int64 `json:"lifeSeconds"`
} }
// 读取缓存 // ReadCacheMessage 读取缓存
type ReadCacheMessage struct { type ReadCacheMessage struct {
CachePolicyJSON []byte `json:"cachePolicyJSON"` CachePolicyJSON []byte `json:"cachePolicyJSON"`
Key string `json:"key"` Key string `json:"key"`
} }
// 统计缓存 // StatCacheMessage 统计缓存
type StatCacheMessage struct { type StatCacheMessage struct {
CachePolicyJSON []byte `json:"cachePolicyJSON"` CachePolicyJSON []byte `json:"cachePolicyJSON"`
} }
@@ -44,7 +45,7 @@ type CleanCacheMessage struct {
CachePolicyJSON []byte `json:"cachePolicyJSON"` CachePolicyJSON []byte `json:"cachePolicyJSON"`
} }
// 删除缓存 // PurgeCacheMessageType 删除缓存
type PurgeCacheMessageType = string type PurgeCacheMessageType = string
const ( const (
@@ -58,16 +59,21 @@ type PurgeCacheMessage struct {
Type PurgeCacheMessageType `json:"type"` // 清理类型 Type PurgeCacheMessageType `json:"type"` // 清理类型
} }
// 预热缓存 // PreheatCacheMessage 预热缓存
type PreheatCacheMessage struct { type PreheatCacheMessage struct {
CachePolicyJSON []byte `json:"cachePolicyJSON"` CachePolicyJSON []byte `json:"cachePolicyJSON"`
Keys []string `json:"keys"` Keys []string `json:"keys"`
} }
// Systemd服务 // CheckSystemdServiceMessage Systemd服务
type CheckSystemdServiceMessage struct { type CheckSystemdServiceMessage struct {
} }
// 有新的节点任务 // NewNodeTaskMessage 有新的节点任务
type NewNodeTaskMessage struct { type NewNodeTaskMessage struct {
} }
// ChangeAPINodeMessage 修改API地址
type ChangeAPINodeMessage struct {
Addr string `json:"addr"`
}

View File

@@ -804,6 +804,92 @@ func (x *FindCurrentAPINodeVersionResponse) GetVersion() string {
return "" return ""
} }
// 获取当前API节点的信息
type FindCurrentAPINodeRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *FindCurrentAPINodeRequest) Reset() {
*x = FindCurrentAPINodeRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_api_node_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindCurrentAPINodeRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindCurrentAPINodeRequest) ProtoMessage() {}
func (x *FindCurrentAPINodeRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_api_node_proto_msgTypes[14]
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 FindCurrentAPINodeRequest.ProtoReflect.Descriptor instead.
func (*FindCurrentAPINodeRequest) Descriptor() ([]byte, []int) {
return file_service_api_node_proto_rawDescGZIP(), []int{14}
}
type FindCurrentAPINodeResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ApiNode *APINode `protobuf:"bytes,1,opt,name=apiNode,proto3" json:"apiNode,omitempty"`
}
func (x *FindCurrentAPINodeResponse) Reset() {
*x = FindCurrentAPINodeResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_api_node_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindCurrentAPINodeResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindCurrentAPINodeResponse) ProtoMessage() {}
func (x *FindCurrentAPINodeResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_api_node_proto_msgTypes[15]
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 FindCurrentAPINodeResponse.ProtoReflect.Descriptor instead.
func (*FindCurrentAPINodeResponse) Descriptor() ([]byte, []int) {
return file_service_api_node_proto_rawDescGZIP(), []int{15}
}
func (x *FindCurrentAPINodeResponse) GetApiNode() *APINode {
if x != nil {
return x.ApiNode
}
return nil
}
// 计算使用某个SSL证书的API节点数量 // 计算使用某个SSL证书的API节点数量
type CountAllEnabledAPINodesWithSSLCertIdRequest struct { type CountAllEnabledAPINodesWithSSLCertIdRequest struct {
state protoimpl.MessageState state protoimpl.MessageState
@@ -816,7 +902,7 @@ type CountAllEnabledAPINodesWithSSLCertIdRequest struct {
func (x *CountAllEnabledAPINodesWithSSLCertIdRequest) Reset() { func (x *CountAllEnabledAPINodesWithSSLCertIdRequest) Reset() {
*x = CountAllEnabledAPINodesWithSSLCertIdRequest{} *x = CountAllEnabledAPINodesWithSSLCertIdRequest{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_service_api_node_proto_msgTypes[14] mi := &file_service_api_node_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -829,7 +915,7 @@ func (x *CountAllEnabledAPINodesWithSSLCertIdRequest) String() string {
func (*CountAllEnabledAPINodesWithSSLCertIdRequest) ProtoMessage() {} func (*CountAllEnabledAPINodesWithSSLCertIdRequest) ProtoMessage() {}
func (x *CountAllEnabledAPINodesWithSSLCertIdRequest) ProtoReflect() protoreflect.Message { func (x *CountAllEnabledAPINodesWithSSLCertIdRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_api_node_proto_msgTypes[14] mi := &file_service_api_node_proto_msgTypes[16]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -842,7 +928,7 @@ func (x *CountAllEnabledAPINodesWithSSLCertIdRequest) ProtoReflect() protoreflec
// Deprecated: Use CountAllEnabledAPINodesWithSSLCertIdRequest.ProtoReflect.Descriptor instead. // Deprecated: Use CountAllEnabledAPINodesWithSSLCertIdRequest.ProtoReflect.Descriptor instead.
func (*CountAllEnabledAPINodesWithSSLCertIdRequest) Descriptor() ([]byte, []int) { func (*CountAllEnabledAPINodesWithSSLCertIdRequest) Descriptor() ([]byte, []int) {
return file_service_api_node_proto_rawDescGZIP(), []int{14} return file_service_api_node_proto_rawDescGZIP(), []int{16}
} }
func (x *CountAllEnabledAPINodesWithSSLCertIdRequest) GetSslCertId() int64 { func (x *CountAllEnabledAPINodesWithSSLCertIdRequest) GetSslCertId() int64 {
@@ -941,67 +1027,79 @@ var file_service_api_node_proto_rawDesc = []byte{
0x65, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x65, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f,
0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72,
0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x22, 0x4b, 0x0a, 0x2b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x69, 0x6f, 0x6e, 0x22, 0x1b, 0x0a, 0x19, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x75, 0x72, 0x72, 0x65,
0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x57, 0x69, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x74, 0x68, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x22, 0x43, 0x0a, 0x1a, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41,
0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x73, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x49, 0x64, 0x18, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25,
0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x73, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x49, 0x64, 0x0a, 0x07, 0x61, 0x70, 0x69, 0x4e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x32, 0xe7, 0x06, 0x0a, 0x0e, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x07, 0x61, 0x70,
0x69, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x50, 0x49, 0x69, 0x4e, 0x6f, 0x64, 0x65, 0x22, 0x4b, 0x0a, 0x2b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c,
0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19,
0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64,
0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0d, 0x75, 0x70, 0x64,
0x61, 0x74, 0x65, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63,
0x63, 0x65, 0x73, 0x73, 0x12, 0x39, 0x0a, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x50,
0x49, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74,
0x65, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12,
0x5f, 0x0a, 0x16, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x46,
0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49,
0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70,
0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x53, 0x0a, 0x17, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62,
0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x22, 0x2e, 0x70, 0x62,
0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x1c, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c,
0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x6e, 0x64, 0x4f, 0x6e, 0x41, 0x50, 0x49,
0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x27, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74,
0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x6e, 0x64, 0x4f, 0x6e, 0x41,
0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14,
0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x13, 0x6c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62,
0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x70, 0x62,
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e,
0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x62,
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e,
0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x12,
0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f,
0x64, 0x65, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62,
0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c,
0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x68, 0x0a, 0x19, 0x66, 0x69, 0x6e, 0x64, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74,
0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x24,
0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41,
0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x75,
0x72, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x24, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50,
0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x57, 0x69, 0x74, 0x68, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72,
0x74, 0x49, 0x64, 0x12, 0x2f, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c,
0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73,
0x57, 0x69, 0x74, 0x68, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x49, 0x64, 0x52, 0x65, 0x71, 0x57, 0x69, 0x74, 0x68, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x49, 0x64, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x43, 0x6f, 0x75, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x73, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x49,
0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x73, 0x6c, 0x43, 0x65, 0x72, 0x74,
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x49, 0x64, 0x32, 0xbc, 0x07, 0x0a, 0x0e, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41,
0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61,
0x74, 0x65, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x50, 0x49, 0x4e,
0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0d, 0x75,
0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x2e, 0x70,
0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53,
0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x39, 0x0a, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65,
0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c,
0x65, 0x74, 0x65, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73,
0x73, 0x12, 0x5f, 0x0a, 0x16, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62,
0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x70, 0x62,
0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41,
0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22,
0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c,
0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x53, 0x0a, 0x17, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e,
0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x22, 0x2e,
0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c,
0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x1c, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x6e, 0x64, 0x4f, 0x6e, 0x41,
0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x27, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75,
0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x6e, 0x64, 0x4f,
0x6e, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x13, 0x6c, 0x69, 0x73, 0x74, 0x45, 0x6e,
0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x1e, 0x2e,
0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50,
0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e,
0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50,
0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53,
0x0a, 0x12, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49,
0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e,
0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61,
0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x19, 0x66, 0x69, 0x6e, 0x64, 0x43, 0x75, 0x72, 0x72, 0x65,
0x6e, 0x74, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
0x12, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e,
0x74, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64,
0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65,
0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a,
0x12, 0x66, 0x69, 0x6e, 0x64, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x4e,
0x6f, 0x64, 0x65, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x75, 0x72,
0x72, 0x65, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x75, 0x72, 0x72,
0x65, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x6d, 0x0a, 0x24, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e,
0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x57, 0x69, 0x74,
0x68, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x49, 0x64, 0x12, 0x2f, 0x2e, 0x70, 0x62, 0x2e,
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41,
0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x57, 0x69, 0x74, 0x68, 0x53, 0x53, 0x4c, 0x43, 0x65,
0x72, 0x74, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x62,
0x2e, 0x52, 0x50, 0x43, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
} }
var ( var (
@@ -1016,7 +1114,7 @@ func file_service_api_node_proto_rawDescGZIP() []byte {
return file_service_api_node_proto_rawDescData return file_service_api_node_proto_rawDescData
} }
var file_service_api_node_proto_msgTypes = make([]protoimpl.MessageInfo, 15) var file_service_api_node_proto_msgTypes = make([]protoimpl.MessageInfo, 17)
var file_service_api_node_proto_goTypes = []interface{}{ var file_service_api_node_proto_goTypes = []interface{}{
(*CreateAPINodeRequest)(nil), // 0: pb.CreateAPINodeRequest (*CreateAPINodeRequest)(nil), // 0: pb.CreateAPINodeRequest
(*CreateAPINodeResponse)(nil), // 1: pb.CreateAPINodeResponse (*CreateAPINodeResponse)(nil), // 1: pb.CreateAPINodeResponse
@@ -1032,40 +1130,45 @@ var file_service_api_node_proto_goTypes = []interface{}{
(*FindEnabledAPINodeResponse)(nil), // 11: pb.FindEnabledAPINodeResponse (*FindEnabledAPINodeResponse)(nil), // 11: pb.FindEnabledAPINodeResponse
(*FindCurrentAPINodeVersionRequest)(nil), // 12: pb.FindCurrentAPINodeVersionRequest (*FindCurrentAPINodeVersionRequest)(nil), // 12: pb.FindCurrentAPINodeVersionRequest
(*FindCurrentAPINodeVersionResponse)(nil), // 13: pb.FindCurrentAPINodeVersionResponse (*FindCurrentAPINodeVersionResponse)(nil), // 13: pb.FindCurrentAPINodeVersionResponse
(*CountAllEnabledAPINodesWithSSLCertIdRequest)(nil), // 14: pb.CountAllEnabledAPINodesWithSSLCertIdRequest (*FindCurrentAPINodeRequest)(nil), // 14: pb.FindCurrentAPINodeRequest
(*APINode)(nil), // 15: pb.APINode (*FindCurrentAPINodeResponse)(nil), // 15: pb.FindCurrentAPINodeResponse
(*RPCSuccess)(nil), // 16: pb.RPCSuccess (*CountAllEnabledAPINodesWithSSLCertIdRequest)(nil), // 16: pb.CountAllEnabledAPINodesWithSSLCertIdRequest
(*RPCCountResponse)(nil), // 17: pb.RPCCountResponse (*APINode)(nil), // 17: pb.APINode
(*RPCSuccess)(nil), // 18: pb.RPCSuccess
(*RPCCountResponse)(nil), // 19: pb.RPCCountResponse
} }
var file_service_api_node_proto_depIdxs = []int32{ var file_service_api_node_proto_depIdxs = []int32{
15, // 0: pb.FindAllEnabledAPINodesResponse.apiNodes:type_name -> pb.APINode 17, // 0: pb.FindAllEnabledAPINodesResponse.apiNodes:type_name -> pb.APINode
15, // 1: pb.ListEnabledAPINodesResponse.apiNodes:type_name -> pb.APINode 17, // 1: pb.ListEnabledAPINodesResponse.apiNodes:type_name -> pb.APINode
15, // 2: pb.FindEnabledAPINodeResponse.apiNode:type_name -> pb.APINode 17, // 2: pb.FindEnabledAPINodeResponse.apiNode:type_name -> pb.APINode
0, // 3: pb.APINodeService.createAPINode:input_type -> pb.CreateAPINodeRequest 17, // 3: pb.FindCurrentAPINodeResponse.apiNode:type_name -> pb.APINode
2, // 4: pb.APINodeService.updateAPINode:input_type -> pb.UpdateAPINodeRequest 0, // 4: pb.APINodeService.createAPINode:input_type -> pb.CreateAPINodeRequest
3, // 5: pb.APINodeService.deleteAPINode:input_type -> pb.DeleteAPINodeRequest 2, // 5: pb.APINodeService.updateAPINode:input_type -> pb.UpdateAPINodeRequest
4, // 6: pb.APINodeService.findAllEnabledAPINodes:input_type -> pb.FindAllEnabledAPINodesRequest 3, // 6: pb.APINodeService.deleteAPINode:input_type -> pb.DeleteAPINodeRequest
6, // 7: pb.APINodeService.countAllEnabledAPINodes:input_type -> pb.CountAllEnabledAPINodesRequest 4, // 7: pb.APINodeService.findAllEnabledAPINodes:input_type -> pb.FindAllEnabledAPINodesRequest
7, // 8: pb.APINodeService.countAllEnabledAndOnAPINodes:input_type -> pb.CountAllEnabledAndOnAPINodesRequest 6, // 8: pb.APINodeService.countAllEnabledAPINodes:input_type -> pb.CountAllEnabledAPINodesRequest
8, // 9: pb.APINodeService.listEnabledAPINodes:input_type -> pb.ListEnabledAPINodesRequest 7, // 9: pb.APINodeService.countAllEnabledAndOnAPINodes:input_type -> pb.CountAllEnabledAndOnAPINodesRequest
10, // 10: pb.APINodeService.findEnabledAPINode:input_type -> pb.FindEnabledAPINodeRequest 8, // 10: pb.APINodeService.listEnabledAPINodes:input_type -> pb.ListEnabledAPINodesRequest
12, // 11: pb.APINodeService.findCurrentAPINodeVersion:input_type -> pb.FindCurrentAPINodeVersionRequest 10, // 11: pb.APINodeService.findEnabledAPINode:input_type -> pb.FindEnabledAPINodeRequest
14, // 12: pb.APINodeService.countAllEnabledAPINodesWithSSLCertId:input_type -> pb.CountAllEnabledAPINodesWithSSLCertIdRequest 12, // 12: pb.APINodeService.findCurrentAPINodeVersion:input_type -> pb.FindCurrentAPINodeVersionRequest
1, // 13: pb.APINodeService.createAPINode:output_type -> pb.CreateAPINodeResponse 14, // 13: pb.APINodeService.findCurrentAPINode:input_type -> pb.FindCurrentAPINodeRequest
16, // 14: pb.APINodeService.updateAPINode:output_type -> pb.RPCSuccess 16, // 14: pb.APINodeService.countAllEnabledAPINodesWithSSLCertId:input_type -> pb.CountAllEnabledAPINodesWithSSLCertIdRequest
16, // 15: pb.APINodeService.deleteAPINode:output_type -> pb.RPCSuccess 1, // 15: pb.APINodeService.createAPINode:output_type -> pb.CreateAPINodeResponse
5, // 16: pb.APINodeService.findAllEnabledAPINodes:output_type -> pb.FindAllEnabledAPINodesResponse 18, // 16: pb.APINodeService.updateAPINode:output_type -> pb.RPCSuccess
17, // 17: pb.APINodeService.countAllEnabledAPINodes:output_type -> pb.RPCCountResponse 18, // 17: pb.APINodeService.deleteAPINode:output_type -> pb.RPCSuccess
17, // 18: pb.APINodeService.countAllEnabledAndOnAPINodes:output_type -> pb.RPCCountResponse 5, // 18: pb.APINodeService.findAllEnabledAPINodes:output_type -> pb.FindAllEnabledAPINodesResponse
9, // 19: pb.APINodeService.listEnabledAPINodes:output_type -> pb.ListEnabledAPINodesResponse 19, // 19: pb.APINodeService.countAllEnabledAPINodes:output_type -> pb.RPCCountResponse
11, // 20: pb.APINodeService.findEnabledAPINode:output_type -> pb.FindEnabledAPINodeResponse 19, // 20: pb.APINodeService.countAllEnabledAndOnAPINodes:output_type -> pb.RPCCountResponse
13, // 21: pb.APINodeService.findCurrentAPINodeVersion:output_type -> pb.FindCurrentAPINodeVersionResponse 9, // 21: pb.APINodeService.listEnabledAPINodes:output_type -> pb.ListEnabledAPINodesResponse
17, // 22: pb.APINodeService.countAllEnabledAPINodesWithSSLCertId:output_type -> pb.RPCCountResponse 11, // 22: pb.APINodeService.findEnabledAPINode:output_type -> pb.FindEnabledAPINodeResponse
13, // [13:23] is the sub-list for method output_type 13, // 23: pb.APINodeService.findCurrentAPINodeVersion:output_type -> pb.FindCurrentAPINodeVersionResponse
3, // [3:13] is the sub-list for method input_type 15, // 24: pb.APINodeService.findCurrentAPINode:output_type -> pb.FindCurrentAPINodeResponse
3, // [3:3] is the sub-list for extension type_name 19, // 25: pb.APINodeService.countAllEnabledAPINodesWithSSLCertId:output_type -> pb.RPCCountResponse
3, // [3:3] is the sub-list for extension extendee 15, // [15:26] is the sub-list for method output_type
0, // [0:3] is the sub-list for field type_name 4, // [4:15] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
} }
func init() { file_service_api_node_proto_init() } func init() { file_service_api_node_proto_init() }
@@ -1245,6 +1348,30 @@ func file_service_api_node_proto_init() {
} }
} }
file_service_api_node_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { file_service_api_node_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindCurrentAPINodeRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_api_node_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindCurrentAPINodeResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_api_node_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CountAllEnabledAPINodesWithSSLCertIdRequest); i { switch v := v.(*CountAllEnabledAPINodesWithSSLCertIdRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -1263,7 +1390,7 @@ func file_service_api_node_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_service_api_node_proto_rawDesc, RawDescriptor: file_service_api_node_proto_rawDesc,
NumEnums: 0, NumEnums: 0,
NumMessages: 15, NumMessages: 17,
NumExtensions: 0, NumExtensions: 0,
NumServices: 1, NumServices: 1,
}, },
@@ -1307,6 +1434,8 @@ type APINodeServiceClient interface {
FindEnabledAPINode(ctx context.Context, in *FindEnabledAPINodeRequest, opts ...grpc.CallOption) (*FindEnabledAPINodeResponse, error) FindEnabledAPINode(ctx context.Context, in *FindEnabledAPINodeRequest, opts ...grpc.CallOption) (*FindEnabledAPINodeResponse, error)
// 获取当前API节点的版本 // 获取当前API节点的版本
FindCurrentAPINodeVersion(ctx context.Context, in *FindCurrentAPINodeVersionRequest, opts ...grpc.CallOption) (*FindCurrentAPINodeVersionResponse, error) FindCurrentAPINodeVersion(ctx context.Context, in *FindCurrentAPINodeVersionRequest, opts ...grpc.CallOption) (*FindCurrentAPINodeVersionResponse, error)
// 获取当前API节点的信息
FindCurrentAPINode(ctx context.Context, in *FindCurrentAPINodeRequest, opts ...grpc.CallOption) (*FindCurrentAPINodeResponse, error)
// 计算使用某个SSL证书的API节点数量 // 计算使用某个SSL证书的API节点数量
CountAllEnabledAPINodesWithSSLCertId(ctx context.Context, in *CountAllEnabledAPINodesWithSSLCertIdRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) CountAllEnabledAPINodesWithSSLCertId(ctx context.Context, in *CountAllEnabledAPINodesWithSSLCertIdRequest, opts ...grpc.CallOption) (*RPCCountResponse, error)
} }
@@ -1400,6 +1529,15 @@ func (c *aPINodeServiceClient) FindCurrentAPINodeVersion(ctx context.Context, in
return out, nil return out, nil
} }
func (c *aPINodeServiceClient) FindCurrentAPINode(ctx context.Context, in *FindCurrentAPINodeRequest, opts ...grpc.CallOption) (*FindCurrentAPINodeResponse, error) {
out := new(FindCurrentAPINodeResponse)
err := c.cc.Invoke(ctx, "/pb.APINodeService/findCurrentAPINode", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *aPINodeServiceClient) CountAllEnabledAPINodesWithSSLCertId(ctx context.Context, in *CountAllEnabledAPINodesWithSSLCertIdRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) { func (c *aPINodeServiceClient) CountAllEnabledAPINodesWithSSLCertId(ctx context.Context, in *CountAllEnabledAPINodesWithSSLCertIdRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) {
out := new(RPCCountResponse) out := new(RPCCountResponse)
err := c.cc.Invoke(ctx, "/pb.APINodeService/countAllEnabledAPINodesWithSSLCertId", in, out, opts...) err := c.cc.Invoke(ctx, "/pb.APINodeService/countAllEnabledAPINodesWithSSLCertId", in, out, opts...)
@@ -1429,6 +1567,8 @@ type APINodeServiceServer interface {
FindEnabledAPINode(context.Context, *FindEnabledAPINodeRequest) (*FindEnabledAPINodeResponse, error) FindEnabledAPINode(context.Context, *FindEnabledAPINodeRequest) (*FindEnabledAPINodeResponse, error)
// 获取当前API节点的版本 // 获取当前API节点的版本
FindCurrentAPINodeVersion(context.Context, *FindCurrentAPINodeVersionRequest) (*FindCurrentAPINodeVersionResponse, error) FindCurrentAPINodeVersion(context.Context, *FindCurrentAPINodeVersionRequest) (*FindCurrentAPINodeVersionResponse, error)
// 获取当前API节点的信息
FindCurrentAPINode(context.Context, *FindCurrentAPINodeRequest) (*FindCurrentAPINodeResponse, error)
// 计算使用某个SSL证书的API节点数量 // 计算使用某个SSL证书的API节点数量
CountAllEnabledAPINodesWithSSLCertId(context.Context, *CountAllEnabledAPINodesWithSSLCertIdRequest) (*RPCCountResponse, error) CountAllEnabledAPINodesWithSSLCertId(context.Context, *CountAllEnabledAPINodesWithSSLCertIdRequest) (*RPCCountResponse, error)
} }
@@ -1464,6 +1604,9 @@ func (*UnimplementedAPINodeServiceServer) FindEnabledAPINode(context.Context, *F
func (*UnimplementedAPINodeServiceServer) FindCurrentAPINodeVersion(context.Context, *FindCurrentAPINodeVersionRequest) (*FindCurrentAPINodeVersionResponse, error) { func (*UnimplementedAPINodeServiceServer) FindCurrentAPINodeVersion(context.Context, *FindCurrentAPINodeVersionRequest) (*FindCurrentAPINodeVersionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindCurrentAPINodeVersion not implemented") return nil, status.Errorf(codes.Unimplemented, "method FindCurrentAPINodeVersion not implemented")
} }
func (*UnimplementedAPINodeServiceServer) FindCurrentAPINode(context.Context, *FindCurrentAPINodeRequest) (*FindCurrentAPINodeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindCurrentAPINode not implemented")
}
func (*UnimplementedAPINodeServiceServer) CountAllEnabledAPINodesWithSSLCertId(context.Context, *CountAllEnabledAPINodesWithSSLCertIdRequest) (*RPCCountResponse, error) { func (*UnimplementedAPINodeServiceServer) CountAllEnabledAPINodesWithSSLCertId(context.Context, *CountAllEnabledAPINodesWithSSLCertIdRequest) (*RPCCountResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CountAllEnabledAPINodesWithSSLCertId not implemented") return nil, status.Errorf(codes.Unimplemented, "method CountAllEnabledAPINodesWithSSLCertId not implemented")
} }
@@ -1634,6 +1777,24 @@ func _APINodeService_FindCurrentAPINodeVersion_Handler(srv interface{}, ctx cont
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _APINodeService_FindCurrentAPINode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindCurrentAPINodeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(APINodeServiceServer).FindCurrentAPINode(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.APINodeService/FindCurrentAPINode",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(APINodeServiceServer).FindCurrentAPINode(ctx, req.(*FindCurrentAPINodeRequest))
}
return interceptor(ctx, in, info, handler)
}
func _APINodeService_CountAllEnabledAPINodesWithSSLCertId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { func _APINodeService_CountAllEnabledAPINodesWithSSLCertId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CountAllEnabledAPINodesWithSSLCertIdRequest) in := new(CountAllEnabledAPINodesWithSSLCertIdRequest)
if err := dec(in); err != nil { if err := dec(in); err != nil {
@@ -1692,6 +1853,10 @@ var _APINodeService_serviceDesc = grpc.ServiceDesc{
MethodName: "findCurrentAPINodeVersion", MethodName: "findCurrentAPINodeVersion",
Handler: _APINodeService_FindCurrentAPINodeVersion_Handler, Handler: _APINodeService_FindCurrentAPINodeVersion_Handler,
}, },
{
MethodName: "findCurrentAPINode",
Handler: _APINodeService_FindCurrentAPINode_Handler,
},
{ {
MethodName: "countAllEnabledAPINodesWithSSLCertId", MethodName: "countAllEnabledAPINodesWithSSLCertId",
Handler: _APINodeService_CountAllEnabledAPINodesWithSSLCertId_Handler, Handler: _APINodeService_CountAllEnabledAPINodesWithSSLCertId_Handler,

File diff suppressed because it is too large Load Diff

View File

@@ -33,6 +33,9 @@ service APINodeService {
// 获取当前API节点的版本 // 获取当前API节点的版本
rpc findCurrentAPINodeVersion (FindCurrentAPINodeVersionRequest) returns (FindCurrentAPINodeVersionResponse); rpc findCurrentAPINodeVersion (FindCurrentAPINodeVersionRequest) returns (FindCurrentAPINodeVersionResponse);
// 获取当前API节点的信息
rpc findCurrentAPINode(FindCurrentAPINodeRequest) returns (FindCurrentAPINodeResponse);
// 计算使用某个SSL证书的API节点数量 // 计算使用某个SSL证书的API节点数量
rpc countAllEnabledAPINodesWithSSLCertId (CountAllEnabledAPINodesWithSSLCertIdRequest) returns (RPCCountResponse); rpc countAllEnabledAPINodesWithSSLCertId (CountAllEnabledAPINodesWithSSLCertIdRequest) returns (RPCCountResponse);
} }
@@ -120,7 +123,15 @@ message FindCurrentAPINodeVersionResponse {
string version = 1; string version = 1;
} }
// 获取当前API节点的信息
message FindCurrentAPINodeRequest {
}
message FindCurrentAPINodeResponse {
APINode apiNode = 1;
}
// 计算使用某个SSL证书的API节点数量 // 计算使用某个SSL证书的API节点数量
message CountAllEnabledAPINodesWithSSLCertIdRequest { message CountAllEnabledAPINodesWithSSLCertIdRequest {
int64 sslCertId = 1; int64 sslCertId = 1;
} }