mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-04 04:54:32 +08:00
阶段性提交
This commit is contained in:
222
internal/rpc/pb/model_api_node.pb.go
Normal file
222
internal/rpc/pb/model_api_node.pb.go
Normal file
@@ -0,0 +1,222 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0
|
||||
// protoc v3.12.3
|
||||
// source: model_api_node.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// 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 APINode struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
IsOn bool `protobuf:"varint,2,opt,name=isOn,proto3" json:"isOn,omitempty"`
|
||||
ClusterId int64 `protobuf:"varint,3,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
|
||||
UniqueId string `protobuf:"bytes,4,opt,name=uniqueId,proto3" json:"uniqueId,omitempty"`
|
||||
Secret string `protobuf:"bytes,5,opt,name=secret,proto3" json:"secret,omitempty"`
|
||||
Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Description string `protobuf:"bytes,7,opt,name=description,proto3" json:"description,omitempty"`
|
||||
Host string `protobuf:"bytes,8,opt,name=host,proto3" json:"host,omitempty"`
|
||||
Port int32 `protobuf:"varint,9,opt,name=port,proto3" json:"port,omitempty"`
|
||||
}
|
||||
|
||||
func (x *APINode) Reset() {
|
||||
*x = APINode{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_model_api_node_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *APINode) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*APINode) ProtoMessage() {}
|
||||
|
||||
func (x *APINode) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_model_api_node_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 APINode.ProtoReflect.Descriptor instead.
|
||||
func (*APINode) Descriptor() ([]byte, []int) {
|
||||
return file_model_api_node_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *APINode) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *APINode) GetIsOn() bool {
|
||||
if x != nil {
|
||||
return x.IsOn
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *APINode) GetClusterId() int64 {
|
||||
if x != nil {
|
||||
return x.ClusterId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *APINode) GetUniqueId() string {
|
||||
if x != nil {
|
||||
return x.UniqueId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *APINode) GetSecret() string {
|
||||
if x != nil {
|
||||
return x.Secret
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *APINode) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *APINode) GetDescription() string {
|
||||
if x != nil {
|
||||
return x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *APINode) GetHost() string {
|
||||
if x != nil {
|
||||
return x.Host
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *APINode) GetPort() int32 {
|
||||
if x != nil {
|
||||
return x.Port
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_model_api_node_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_model_api_node_proto_rawDesc = []byte{
|
||||
0x0a, 0x14, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x6e, 0x6f, 0x64, 0x65,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xdd, 0x01, 0x0a, 0x07, 0x41,
|
||||
0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c,
|
||||
0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63,
|
||||
0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x6e, 0x69, 0x71,
|
||||
0x75, 0x65, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x6e, 0x69, 0x71,
|
||||
0x75, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x05,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
|
||||
0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18,
|
||||
0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x09,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f,
|
||||
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_model_api_node_proto_rawDescOnce sync.Once
|
||||
file_model_api_node_proto_rawDescData = file_model_api_node_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_model_api_node_proto_rawDescGZIP() []byte {
|
||||
file_model_api_node_proto_rawDescOnce.Do(func() {
|
||||
file_model_api_node_proto_rawDescData = protoimpl.X.CompressGZIP(file_model_api_node_proto_rawDescData)
|
||||
})
|
||||
return file_model_api_node_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_model_api_node_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_model_api_node_proto_goTypes = []interface{}{
|
||||
(*APINode)(nil), // 0: pb.APINode
|
||||
}
|
||||
var file_model_api_node_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] 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_model_api_node_proto_init() }
|
||||
func file_model_api_node_proto_init() {
|
||||
if File_model_api_node_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_model_api_node_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*APINode); 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_model_api_node_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_model_api_node_proto_goTypes,
|
||||
DependencyIndexes: file_model_api_node_proto_depIdxs,
|
||||
MessageInfos: file_model_api_node_proto_msgTypes,
|
||||
}.Build()
|
||||
File_model_api_node_proto = out.File
|
||||
file_model_api_node_proto_rawDesc = nil
|
||||
file_model_api_node_proto_goTypes = nil
|
||||
file_model_api_node_proto_depIdxs = nil
|
||||
}
|
||||
@@ -30,11 +30,16 @@ type Node struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
|
||||
Cluster *NodeCluster `protobuf:"bytes,32,opt,name=cluster,proto3" json:"cluster,omitempty"`
|
||||
Login *NodeLogin `protobuf:"bytes,33,opt,name=login,proto3" json:"login,omitempty"`
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
|
||||
InstallDir string `protobuf:"bytes,4,opt,name=installDir,proto3" json:"installDir,omitempty"`
|
||||
IsInstalled bool `protobuf:"varint,5,opt,name=isInstalled,proto3" json:"isInstalled,omitempty"`
|
||||
Code string `protobuf:"bytes,6,opt,name=code,proto3" json:"code,omitempty"`
|
||||
UniqueId string `protobuf:"bytes,7,opt,name=uniqueId,proto3" json:"uniqueId,omitempty"`
|
||||
Secret string `protobuf:"bytes,8,opt,name=secret,proto3" json:"secret,omitempty"`
|
||||
Cluster *NodeCluster `protobuf:"bytes,32,opt,name=cluster,proto3" json:"cluster,omitempty"`
|
||||
Login *NodeLogin `protobuf:"bytes,33,opt,name=login,proto3" json:"login,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Node) Reset() {
|
||||
@@ -90,6 +95,41 @@ func (x *Node) GetStatus() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Node) GetInstallDir() string {
|
||||
if x != nil {
|
||||
return x.InstallDir
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Node) GetIsInstalled() bool {
|
||||
if x != nil {
|
||||
return x.IsInstalled
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *Node) GetCode() string {
|
||||
if x != nil {
|
||||
return x.Code
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Node) GetUniqueId() string {
|
||||
if x != nil {
|
||||
return x.UniqueId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Node) GetSecret() string {
|
||||
if x != nil {
|
||||
return x.Secret
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Node) GetCluster() *NodeCluster {
|
||||
if x != nil {
|
||||
return x.Cluster
|
||||
@@ -111,17 +151,26 @@ var file_model_node_proto_rawDesc = []byte{
|
||||
0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x18, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x6f,
|
||||
0x64, 0x65, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x1a, 0x16, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6c, 0x6f, 0x67,
|
||||
0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x92, 0x01, 0x0a, 0x04, 0x4e, 0x6f, 0x64,
|
||||
0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9c, 0x02, 0x0a, 0x04, 0x4e, 0x6f, 0x64,
|
||||
0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69,
|
||||
0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x29, 0x0a,
|
||||
0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f,
|
||||
0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52,
|
||||
0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x05, 0x6c, 0x6f, 0x67, 0x69,
|
||||
0x6e, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64,
|
||||
0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x05, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x42, 0x06, 0x5a,
|
||||
0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a,
|
||||
0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x44, 0x69, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x44, 0x69, 0x72, 0x12, 0x20, 0x0a,
|
||||
0x0b, 0x69, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01,
|
||||
0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63,
|
||||
0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x64, 0x18,
|
||||
0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x64, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x29, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74,
|
||||
0x65, 0x72, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f,
|
||||
0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74,
|
||||
0x65, 0x72, 0x12, 0x23, 0x0a, 0x05, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x18, 0x21, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e,
|
||||
0x52, 0x05, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
@@ -30,9 +30,11 @@ type NodeCluster struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
CreatedAt int64 `protobuf:"varint,3,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
CreatedAt int64 `protobuf:"varint,3,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
|
||||
GrantId int64 `protobuf:"varint,4,opt,name=grantId,proto3" json:"grantId,omitempty"`
|
||||
InstallDir string `protobuf:"bytes,5,opt,name=installDir,proto3" json:"installDir,omitempty"`
|
||||
}
|
||||
|
||||
func (x *NodeCluster) Reset() {
|
||||
@@ -88,17 +90,35 @@ func (x *NodeCluster) GetCreatedAt() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *NodeCluster) GetGrantId() int64 {
|
||||
if x != nil {
|
||||
return x.GrantId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *NodeCluster) GetInstallDir() string {
|
||||
if x != nil {
|
||||
return x.InstallDir
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_model_node_cluster_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_model_node_cluster_proto_rawDesc = []byte{
|
||||
0x0a, 0x18, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x63, 0x6c, 0x75,
|
||||
0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x4f,
|
||||
0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x0e, 0x0a,
|
||||
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
|
||||
0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x42,
|
||||
0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x89,
|
||||
0x01, 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x0e,
|
||||
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
|
||||
0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74,
|
||||
0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e,
|
||||
0x73, 0x74, 0x61, 0x6c, 0x6c, 0x44, 0x69, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
|
||||
0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x44, 0x69, 0x72, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f,
|
||||
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
1385
internal/rpc/pb/service_api_node.pb.go
Normal file
1385
internal/rpc/pb/service_api_node.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
@@ -227,17 +227,18 @@ func (x *CountAllEnabledNodesResponse) GetCount() int64 {
|
||||
}
|
||||
|
||||
// 列出单页节点
|
||||
type ListEnabledNodesRequest struct {
|
||||
type ListEnabledNodesMatchRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
|
||||
Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
|
||||
Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
|
||||
Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
|
||||
ClusterId int64 `protobuf:"varint,3,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ListEnabledNodesRequest) Reset() {
|
||||
*x = ListEnabledNodesRequest{}
|
||||
func (x *ListEnabledNodesMatchRequest) Reset() {
|
||||
*x = ListEnabledNodesMatchRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_node_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
@@ -245,13 +246,13 @@ func (x *ListEnabledNodesRequest) Reset() {
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ListEnabledNodesRequest) String() string {
|
||||
func (x *ListEnabledNodesMatchRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListEnabledNodesRequest) ProtoMessage() {}
|
||||
func (*ListEnabledNodesMatchRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListEnabledNodesRequest) ProtoReflect() protoreflect.Message {
|
||||
func (x *ListEnabledNodesMatchRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_node_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
@@ -263,26 +264,33 @@ func (x *ListEnabledNodesRequest) ProtoReflect() protoreflect.Message {
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListEnabledNodesRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListEnabledNodesRequest) Descriptor() ([]byte, []int) {
|
||||
// Deprecated: Use ListEnabledNodesMatchRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListEnabledNodesMatchRequest) Descriptor() ([]byte, []int) {
|
||||
return file_service_node_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *ListEnabledNodesRequest) GetOffset() int64 {
|
||||
func (x *ListEnabledNodesMatchRequest) GetOffset() int64 {
|
||||
if x != nil {
|
||||
return x.Offset
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ListEnabledNodesRequest) GetSize() int64 {
|
||||
func (x *ListEnabledNodesMatchRequest) GetSize() int64 {
|
||||
if x != nil {
|
||||
return x.Size
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type ListEnabledNodesResponse struct {
|
||||
func (x *ListEnabledNodesMatchRequest) GetClusterId() int64 {
|
||||
if x != nil {
|
||||
return x.ClusterId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type ListEnabledNodesMatchResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
@@ -290,8 +298,8 @@ type ListEnabledNodesResponse struct {
|
||||
Nodes []*Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ListEnabledNodesResponse) Reset() {
|
||||
*x = ListEnabledNodesResponse{}
|
||||
func (x *ListEnabledNodesMatchResponse) Reset() {
|
||||
*x = ListEnabledNodesMatchResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_node_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
@@ -299,13 +307,13 @@ func (x *ListEnabledNodesResponse) Reset() {
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ListEnabledNodesResponse) String() string {
|
||||
func (x *ListEnabledNodesMatchResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListEnabledNodesResponse) ProtoMessage() {}
|
||||
func (*ListEnabledNodesMatchResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListEnabledNodesResponse) ProtoReflect() protoreflect.Message {
|
||||
func (x *ListEnabledNodesMatchResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_node_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
@@ -317,12 +325,12 @@ func (x *ListEnabledNodesResponse) ProtoReflect() protoreflect.Message {
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListEnabledNodesResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListEnabledNodesResponse) Descriptor() ([]byte, []int) {
|
||||
// Deprecated: Use ListEnabledNodesMatchResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListEnabledNodesMatchResponse) Descriptor() ([]byte, []int) {
|
||||
return file_service_node_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *ListEnabledNodesResponse) GetNodes() []*Node {
|
||||
func (x *ListEnabledNodesMatchResponse) GetNodes() []*Node {
|
||||
if x != nil {
|
||||
return x.Nodes
|
||||
}
|
||||
@@ -963,6 +971,195 @@ func (*SyncNodesVersionWithClusterResponse) Descriptor() ([]byte, []int) {
|
||||
return file_service_node_proto_rawDescGZIP(), []int{19}
|
||||
}
|
||||
|
||||
// 计算匹配的节点数量
|
||||
type CountAllEnabledNodesMatchRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ClusterId int64 `protobuf:"varint,1,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
|
||||
}
|
||||
|
||||
func (x *CountAllEnabledNodesMatchRequest) Reset() {
|
||||
*x = CountAllEnabledNodesMatchRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_node_proto_msgTypes[20]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *CountAllEnabledNodesMatchRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CountAllEnabledNodesMatchRequest) ProtoMessage() {}
|
||||
|
||||
func (x *CountAllEnabledNodesMatchRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_node_proto_msgTypes[20]
|
||||
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 CountAllEnabledNodesMatchRequest.ProtoReflect.Descriptor instead.
|
||||
func (*CountAllEnabledNodesMatchRequest) Descriptor() ([]byte, []int) {
|
||||
return file_service_node_proto_rawDescGZIP(), []int{20}
|
||||
}
|
||||
|
||||
func (x *CountAllEnabledNodesMatchRequest) GetClusterId() int64 {
|
||||
if x != nil {
|
||||
return x.ClusterId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type CountAllEnabledNodesMatchResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
|
||||
}
|
||||
|
||||
func (x *CountAllEnabledNodesMatchResponse) Reset() {
|
||||
*x = CountAllEnabledNodesMatchResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_node_proto_msgTypes[21]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *CountAllEnabledNodesMatchResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CountAllEnabledNodesMatchResponse) ProtoMessage() {}
|
||||
|
||||
func (x *CountAllEnabledNodesMatchResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_node_proto_msgTypes[21]
|
||||
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 CountAllEnabledNodesMatchResponse.ProtoReflect.Descriptor instead.
|
||||
func (*CountAllEnabledNodesMatchResponse) Descriptor() ([]byte, []int) {
|
||||
return file_service_node_proto_rawDescGZIP(), []int{21}
|
||||
}
|
||||
|
||||
func (x *CountAllEnabledNodesMatchResponse) GetCount() int64 {
|
||||
if x != nil {
|
||||
return x.Count
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// 修改节点安装状态
|
||||
type UpdateNodeIsInstalledRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
NodeId int64 `protobuf:"varint,1,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
|
||||
IsInstalled bool `protobuf:"varint,2,opt,name=isInstalled,proto3" json:"isInstalled,omitempty"`
|
||||
}
|
||||
|
||||
func (x *UpdateNodeIsInstalledRequest) Reset() {
|
||||
*x = UpdateNodeIsInstalledRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_node_proto_msgTypes[22]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *UpdateNodeIsInstalledRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UpdateNodeIsInstalledRequest) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateNodeIsInstalledRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_node_proto_msgTypes[22]
|
||||
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 UpdateNodeIsInstalledRequest.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateNodeIsInstalledRequest) Descriptor() ([]byte, []int) {
|
||||
return file_service_node_proto_rawDescGZIP(), []int{22}
|
||||
}
|
||||
|
||||
func (x *UpdateNodeIsInstalledRequest) GetNodeId() int64 {
|
||||
if x != nil {
|
||||
return x.NodeId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UpdateNodeIsInstalledRequest) GetIsInstalled() bool {
|
||||
if x != nil {
|
||||
return x.IsInstalled
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type UpdateNodeIsInstalledResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *UpdateNodeIsInstalledResponse) Reset() {
|
||||
*x = UpdateNodeIsInstalledResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_node_proto_msgTypes[23]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *UpdateNodeIsInstalledResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UpdateNodeIsInstalledResponse) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateNodeIsInstalledResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_node_proto_msgTypes[23]
|
||||
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 UpdateNodeIsInstalledResponse.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateNodeIsInstalledResponse) Descriptor() ([]byte, []int) {
|
||||
return file_service_node_proto_rawDescGZIP(), []int{23}
|
||||
}
|
||||
|
||||
var File_service_node_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_service_node_proto_rawDesc = []byte{
|
||||
@@ -985,57 +1182,75 @@ var file_service_node_proto_rawDesc = []byte{
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f,
|
||||
0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x22, 0x45, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
|
||||
0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06,
|
||||
0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66,
|
||||
0x66, 0x73, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x3a, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20,
|
||||
0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x6e,
|
||||
0x6f, 0x64, 0x65, 0x73, 0x22, 0x2c, 0x0a, 0x12, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4e,
|
||||
0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f,
|
||||
0x64, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65,
|
||||
0x49, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x64,
|
||||
0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x82, 0x01, 0x0a, 0x11, 0x55, 0x70,
|
||||
0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63,
|
||||
0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
|
||||
0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x05, 0x4c, 0x6f, 0x67,
|
||||
0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f,
|
||||
0x64, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x22, 0x14,
|
||||
0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x0a, 0x16, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62,
|
||||
0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16,
|
||||
0x0a, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06,
|
||||
0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x22, 0x37, 0x0a, 0x17, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e,
|
||||
0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x12, 0x1c, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x08, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x22,
|
||||
0x1a, 0x0a, 0x18, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f,
|
||||
0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3b, 0x0a, 0x19, 0x43,
|
||||
0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x66,
|
||||
0x69, 0x67, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x6f,
|
||||
0x6e, 0x66, 0x69, 0x67, 0x4a, 0x53, 0x4f, 0x4e, 0x22, 0x13, 0x0a, 0x11, 0x4e, 0x6f, 0x64, 0x65,
|
||||
0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x14, 0x0a,
|
||||
0x12, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x22, 0x51, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64,
|
||||
0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16,
|
||||
0x0a, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06,
|
||||
0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74,
|
||||
0x75, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x22, 0x1a, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x22, 0x42, 0x0a, 0x22, 0x53, 0x79, 0x6e, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x56,
|
||||
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65,
|
||||
0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x75, 0x73,
|
||||
0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x6c, 0x75,
|
||||
0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0x25, 0x0a, 0x23, 0x53, 0x79, 0x6e, 0x63, 0x4e, 0x6f,
|
||||
0x64, 0x65, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6c,
|
||||
0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x8f, 0x06,
|
||||
0x74, 0x22, 0x68, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
|
||||
0x4e, 0x6f, 0x64, 0x65, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a,
|
||||
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1c, 0x0a,
|
||||
0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03,
|
||||
0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0x3f, 0x0a, 0x1d, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x4d,
|
||||
0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x05,
|
||||
0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62,
|
||||
0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x2c, 0x0a, 0x12,
|
||||
0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x44, 0x69,
|
||||
0x73, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x22, 0x82, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
|
||||
0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49,
|
||||
0x64, 0x12, 0x23, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52,
|
||||
0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x22, 0x14, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x0a, 0x16,
|
||||
0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x22, 0x37,
|
||||
0x0a, 0x17, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64,
|
||||
0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x04, 0x6e, 0x6f, 0x64,
|
||||
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64,
|
||||
0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x22, 0x1a, 0x0a, 0x18, 0x43, 0x6f, 0x6d, 0x70, 0x6f,
|
||||
0x73, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x22, 0x3b, 0x0a, 0x19, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x4e, 0x6f,
|
||||
0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4a, 0x53, 0x4f, 0x4e,
|
||||
0x22, 0x13, 0x0a, 0x11, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x14, 0x0a, 0x12, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x72,
|
||||
0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x51, 0x0a, 0x17, 0x55,
|
||||
0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1e,
|
||||
0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x0c, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x22, 0x1a,
|
||||
0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74,
|
||||
0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x0a, 0x22, 0x53, 0x79,
|
||||
0x6e, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x57, 0x69,
|
||||
0x74, 0x68, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0x25,
|
||||
0x0a, 0x23, 0x53, 0x79, 0x6e, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69,
|
||||
0x6f, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x40, 0x0a, 0x20, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c,
|
||||
0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x4d, 0x61, 0x74,
|
||||
0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x75,
|
||||
0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x6c,
|
||||
0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0x39, 0x0a, 0x21, 0x43, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x4d,
|
||||
0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x22, 0x58, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65,
|
||||
0x49, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x73,
|
||||
0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||
0x0b, 0x69, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x22, 0x1f, 0x0a, 0x1d,
|
||||
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x73, 0x49, 0x6e, 0x73, 0x74,
|
||||
0x61, 0x6c, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xe6, 0x07,
|
||||
0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3b, 0x0a,
|
||||
0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x15, 0x2e, 0x70, 0x62,
|
||||
0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
@@ -1046,46 +1261,60 @@ var file_service_node_proto_rawDesc = []byte{
|
||||
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c,
|
||||
0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x10, 0x6c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61,
|
||||
0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4e,
|
||||
0x6f, 0x64, 0x65, 0x12, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65,
|
||||
0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x62,
|
||||
0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f,
|
||||
0x64, 0x65, 0x12, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f,
|
||||
0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x55,
|
||||
0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
|
||||
0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e,
|
||||
0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
|
||||
0x64, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a,
|
||||
0x11, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66,
|
||||
0x69, 0x67, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x4e,
|
||||
0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x4e, 0x6f, 0x64,
|
||||
0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
||||
0x3f, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x15, 0x2e,
|
||||
0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74,
|
||||
0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01,
|
||||
0x12, 0x4d, 0x0a, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74,
|
||||
0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64,
|
||||
0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
||||
0x6e, 0x0a, 0x1b, 0x73, 0x79, 0x6e, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x56, 0x65, 0x72, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x26,
|
||||
0x2e, 0x70, 0x62, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x56, 0x65, 0x72,
|
||||
0x73, 0x69, 0x6f, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x79, 0x6e, 0x63,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x19, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c,
|
||||
0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x4d, 0x61, 0x74,
|
||||
0x63, 0x68, 0x12, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c,
|
||||
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x4d, 0x61, 0x74, 0x63,
|
||||
0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64,
|
||||
0x65, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
||||
0x5c, 0x0a, 0x15, 0x6c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f,
|
||||
0x64, 0x65, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x4d, 0x61,
|
||||
0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x62, 0x2e,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73,
|
||||
0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a,
|
||||
0x0b, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x2e, 0x70,
|
||||
0x62, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c,
|
||||
0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a,
|
||||
0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x15, 0x2e, 0x70, 0x62,
|
||||
0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f,
|
||||
0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x66, 0x69,
|
||||
0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x2e,
|
||||
0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f,
|
||||
0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x46,
|
||||
0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73,
|
||||
0x65, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1c, 0x2e, 0x70, 0x62,
|
||||
0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66,
|
||||
0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x43,
|
||||
0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65,
|
||||
0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65,
|
||||
0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e,
|
||||
0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x4d, 0x0a, 0x10, 0x75, 0x70, 0x64,
|
||||
0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x2e,
|
||||
0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61,
|
||||
0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e,
|
||||
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a, 0x1b, 0x73, 0x79, 0x6e, 0x63,
|
||||
0x4e, 0x6f, 0x64, 0x65, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x57, 0x69, 0x74, 0x68,
|
||||
0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42,
|
||||
0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x26, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x79, 0x6e,
|
||||
0x63, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x57, 0x69, 0x74,
|
||||
0x68, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x27, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x56, 0x65,
|
||||
0x72, 0x73, 0x69, 0x6f, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x15, 0x75, 0x70, 0x64, 0x61,
|
||||
0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65,
|
||||
0x64, 0x12, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64,
|
||||
0x65, 0x49, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e,
|
||||
0x6f, 0x64, 0x65, 0x49, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 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 (
|
||||
@@ -1100,14 +1329,14 @@ func file_service_node_proto_rawDescGZIP() []byte {
|
||||
return file_service_node_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_service_node_proto_msgTypes = make([]protoimpl.MessageInfo, 20)
|
||||
var file_service_node_proto_msgTypes = make([]protoimpl.MessageInfo, 24)
|
||||
var file_service_node_proto_goTypes = []interface{}{
|
||||
(*CreateNodeRequest)(nil), // 0: pb.CreateNodeRequest
|
||||
(*CreateNodeResponse)(nil), // 1: pb.CreateNodeResponse
|
||||
(*CountAllEnabledNodesRequest)(nil), // 2: pb.CountAllEnabledNodesRequest
|
||||
(*CountAllEnabledNodesResponse)(nil), // 3: pb.CountAllEnabledNodesResponse
|
||||
(*ListEnabledNodesRequest)(nil), // 4: pb.ListEnabledNodesRequest
|
||||
(*ListEnabledNodesResponse)(nil), // 5: pb.ListEnabledNodesResponse
|
||||
(*ListEnabledNodesMatchRequest)(nil), // 4: pb.ListEnabledNodesMatchRequest
|
||||
(*ListEnabledNodesMatchResponse)(nil), // 5: pb.ListEnabledNodesMatchResponse
|
||||
(*DisableNodeRequest)(nil), // 6: pb.DisableNodeRequest
|
||||
(*DisableNodeResponse)(nil), // 7: pb.DisableNodeResponse
|
||||
(*UpdateNodeRequest)(nil), // 8: pb.UpdateNodeRequest
|
||||
@@ -1122,36 +1351,44 @@ var file_service_node_proto_goTypes = []interface{}{
|
||||
(*UpdateNodeStatusResponse)(nil), // 17: pb.UpdateNodeStatusResponse
|
||||
(*SyncNodesVersionWithClusterRequest)(nil), // 18: pb.SyncNodesVersionWithClusterRequest
|
||||
(*SyncNodesVersionWithClusterResponse)(nil), // 19: pb.SyncNodesVersionWithClusterResponse
|
||||
(*NodeLogin)(nil), // 20: pb.NodeLogin
|
||||
(*Node)(nil), // 21: pb.Node
|
||||
(*CountAllEnabledNodesMatchRequest)(nil), // 20: pb.CountAllEnabledNodesMatchRequest
|
||||
(*CountAllEnabledNodesMatchResponse)(nil), // 21: pb.CountAllEnabledNodesMatchResponse
|
||||
(*UpdateNodeIsInstalledRequest)(nil), // 22: pb.UpdateNodeIsInstalledRequest
|
||||
(*UpdateNodeIsInstalledResponse)(nil), // 23: pb.UpdateNodeIsInstalledResponse
|
||||
(*NodeLogin)(nil), // 24: pb.NodeLogin
|
||||
(*Node)(nil), // 25: pb.Node
|
||||
}
|
||||
var file_service_node_proto_depIdxs = []int32{
|
||||
20, // 0: pb.CreateNodeRequest.Login:type_name -> pb.NodeLogin
|
||||
21, // 1: pb.ListEnabledNodesResponse.nodes:type_name -> pb.Node
|
||||
20, // 2: pb.UpdateNodeRequest.Login:type_name -> pb.NodeLogin
|
||||
21, // 3: pb.FindEnabledNodeResponse.node:type_name -> pb.Node
|
||||
24, // 0: pb.CreateNodeRequest.Login:type_name -> pb.NodeLogin
|
||||
25, // 1: pb.ListEnabledNodesMatchResponse.nodes:type_name -> pb.Node
|
||||
24, // 2: pb.UpdateNodeRequest.Login:type_name -> pb.NodeLogin
|
||||
25, // 3: pb.FindEnabledNodeResponse.node:type_name -> pb.Node
|
||||
0, // 4: pb.NodeService.createNode:input_type -> pb.CreateNodeRequest
|
||||
2, // 5: pb.NodeService.countAllEnabledNodes:input_type -> pb.CountAllEnabledNodesRequest
|
||||
4, // 6: pb.NodeService.listEnabledNodes:input_type -> pb.ListEnabledNodesRequest
|
||||
6, // 7: pb.NodeService.disableNode:input_type -> pb.DisableNodeRequest
|
||||
8, // 8: pb.NodeService.updateNode:input_type -> pb.UpdateNodeRequest
|
||||
10, // 9: pb.NodeService.findEnabledNode:input_type -> pb.FindEnabledNodeRequest
|
||||
12, // 10: pb.NodeService.composeNodeConfig:input_type -> pb.ComposeNodeConfigRequest
|
||||
14, // 11: pb.NodeService.nodeStream:input_type -> pb.NodeStreamRequest
|
||||
16, // 12: pb.NodeService.updateNodeStatus:input_type -> pb.UpdateNodeStatusRequest
|
||||
18, // 13: pb.NodeService.syncNodesVersionWithCluster:input_type -> pb.SyncNodesVersionWithClusterRequest
|
||||
1, // 14: pb.NodeService.createNode:output_type -> pb.CreateNodeResponse
|
||||
3, // 15: pb.NodeService.countAllEnabledNodes:output_type -> pb.CountAllEnabledNodesResponse
|
||||
5, // 16: pb.NodeService.listEnabledNodes:output_type -> pb.ListEnabledNodesResponse
|
||||
7, // 17: pb.NodeService.disableNode:output_type -> pb.DisableNodeResponse
|
||||
9, // 18: pb.NodeService.updateNode:output_type -> pb.UpdateNodeResponse
|
||||
11, // 19: pb.NodeService.findEnabledNode:output_type -> pb.FindEnabledNodeResponse
|
||||
13, // 20: pb.NodeService.composeNodeConfig:output_type -> pb.ComposeNodeConfigResponse
|
||||
15, // 21: pb.NodeService.nodeStream:output_type -> pb.NodeStreamResponse
|
||||
17, // 22: pb.NodeService.updateNodeStatus:output_type -> pb.UpdateNodeStatusResponse
|
||||
19, // 23: pb.NodeService.syncNodesVersionWithCluster:output_type -> pb.SyncNodesVersionWithClusterResponse
|
||||
14, // [14:24] is the sub-list for method output_type
|
||||
4, // [4:14] is the sub-list for method input_type
|
||||
20, // 6: pb.NodeService.countAllEnabledNodesMatch:input_type -> pb.CountAllEnabledNodesMatchRequest
|
||||
4, // 7: pb.NodeService.listEnabledNodesMatch:input_type -> pb.ListEnabledNodesMatchRequest
|
||||
6, // 8: pb.NodeService.disableNode:input_type -> pb.DisableNodeRequest
|
||||
8, // 9: pb.NodeService.updateNode:input_type -> pb.UpdateNodeRequest
|
||||
10, // 10: pb.NodeService.findEnabledNode:input_type -> pb.FindEnabledNodeRequest
|
||||
12, // 11: pb.NodeService.composeNodeConfig:input_type -> pb.ComposeNodeConfigRequest
|
||||
14, // 12: pb.NodeService.nodeStream:input_type -> pb.NodeStreamRequest
|
||||
16, // 13: pb.NodeService.updateNodeStatus:input_type -> pb.UpdateNodeStatusRequest
|
||||
18, // 14: pb.NodeService.syncNodesVersionWithCluster:input_type -> pb.SyncNodesVersionWithClusterRequest
|
||||
22, // 15: pb.NodeService.updateNodeIsInstalled:input_type -> pb.UpdateNodeIsInstalledRequest
|
||||
1, // 16: pb.NodeService.createNode:output_type -> pb.CreateNodeResponse
|
||||
3, // 17: pb.NodeService.countAllEnabledNodes:output_type -> pb.CountAllEnabledNodesResponse
|
||||
21, // 18: pb.NodeService.countAllEnabledNodesMatch:output_type -> pb.CountAllEnabledNodesMatchResponse
|
||||
5, // 19: pb.NodeService.listEnabledNodesMatch:output_type -> pb.ListEnabledNodesMatchResponse
|
||||
7, // 20: pb.NodeService.disableNode:output_type -> pb.DisableNodeResponse
|
||||
9, // 21: pb.NodeService.updateNode:output_type -> pb.UpdateNodeResponse
|
||||
11, // 22: pb.NodeService.findEnabledNode:output_type -> pb.FindEnabledNodeResponse
|
||||
13, // 23: pb.NodeService.composeNodeConfig:output_type -> pb.ComposeNodeConfigResponse
|
||||
15, // 24: pb.NodeService.nodeStream:output_type -> pb.NodeStreamResponse
|
||||
17, // 25: pb.NodeService.updateNodeStatus:output_type -> pb.UpdateNodeStatusResponse
|
||||
19, // 26: pb.NodeService.syncNodesVersionWithCluster:output_type -> pb.SyncNodesVersionWithClusterResponse
|
||||
23, // 27: pb.NodeService.updateNodeIsInstalled:output_type -> pb.UpdateNodeIsInstalledResponse
|
||||
16, // [16:28] is the sub-list for method output_type
|
||||
4, // [4:16] 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
|
||||
@@ -1214,7 +1451,7 @@ func file_service_node_proto_init() {
|
||||
}
|
||||
}
|
||||
file_service_node_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListEnabledNodesRequest); i {
|
||||
switch v := v.(*ListEnabledNodesMatchRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@@ -1226,7 +1463,7 @@ func file_service_node_proto_init() {
|
||||
}
|
||||
}
|
||||
file_service_node_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListEnabledNodesResponse); i {
|
||||
switch v := v.(*ListEnabledNodesMatchResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@@ -1405,6 +1642,54 @@ func file_service_node_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_service_node_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CountAllEnabledNodesMatchRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_service_node_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CountAllEnabledNodesMatchResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_service_node_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UpdateNodeIsInstalledRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_service_node_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UpdateNodeIsInstalledResponse); 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{
|
||||
@@ -1412,7 +1697,7 @@ func file_service_node_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_service_node_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 20,
|
||||
NumMessages: 24,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
@@ -1442,8 +1727,10 @@ type NodeServiceClient interface {
|
||||
CreateNode(ctx context.Context, in *CreateNodeRequest, opts ...grpc.CallOption) (*CreateNodeResponse, error)
|
||||
// 节点数量
|
||||
CountAllEnabledNodes(ctx context.Context, in *CountAllEnabledNodesRequest, opts ...grpc.CallOption) (*CountAllEnabledNodesResponse, error)
|
||||
// 计算匹配的节点数量
|
||||
CountAllEnabledNodesMatch(ctx context.Context, in *CountAllEnabledNodesMatchRequest, opts ...grpc.CallOption) (*CountAllEnabledNodesMatchResponse, error)
|
||||
// 列出单页节点
|
||||
ListEnabledNodes(ctx context.Context, in *ListEnabledNodesRequest, opts ...grpc.CallOption) (*ListEnabledNodesResponse, error)
|
||||
ListEnabledNodesMatch(ctx context.Context, in *ListEnabledNodesMatchRequest, opts ...grpc.CallOption) (*ListEnabledNodesMatchResponse, error)
|
||||
// 禁用节点
|
||||
DisableNode(ctx context.Context, in *DisableNodeRequest, opts ...grpc.CallOption) (*DisableNodeResponse, error)
|
||||
// 修改节点
|
||||
@@ -1458,6 +1745,8 @@ type NodeServiceClient interface {
|
||||
UpdateNodeStatus(ctx context.Context, in *UpdateNodeStatusRequest, opts ...grpc.CallOption) (*UpdateNodeStatusResponse, error)
|
||||
// 同步集群中的节点版本
|
||||
SyncNodesVersionWithCluster(ctx context.Context, in *SyncNodesVersionWithClusterRequest, opts ...grpc.CallOption) (*SyncNodesVersionWithClusterResponse, error)
|
||||
// 修改节点安装状态
|
||||
UpdateNodeIsInstalled(ctx context.Context, in *UpdateNodeIsInstalledRequest, opts ...grpc.CallOption) (*UpdateNodeIsInstalledResponse, error)
|
||||
}
|
||||
|
||||
type nodeServiceClient struct {
|
||||
@@ -1486,9 +1775,18 @@ func (c *nodeServiceClient) CountAllEnabledNodes(ctx context.Context, in *CountA
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *nodeServiceClient) ListEnabledNodes(ctx context.Context, in *ListEnabledNodesRequest, opts ...grpc.CallOption) (*ListEnabledNodesResponse, error) {
|
||||
out := new(ListEnabledNodesResponse)
|
||||
err := c.cc.Invoke(ctx, "/pb.NodeService/listEnabledNodes", in, out, opts...)
|
||||
func (c *nodeServiceClient) CountAllEnabledNodesMatch(ctx context.Context, in *CountAllEnabledNodesMatchRequest, opts ...grpc.CallOption) (*CountAllEnabledNodesMatchResponse, error) {
|
||||
out := new(CountAllEnabledNodesMatchResponse)
|
||||
err := c.cc.Invoke(ctx, "/pb.NodeService/countAllEnabledNodesMatch", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *nodeServiceClient) ListEnabledNodesMatch(ctx context.Context, in *ListEnabledNodesMatchRequest, opts ...grpc.CallOption) (*ListEnabledNodesMatchResponse, error) {
|
||||
out := new(ListEnabledNodesMatchResponse)
|
||||
err := c.cc.Invoke(ctx, "/pb.NodeService/listEnabledNodesMatch", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -1580,14 +1878,25 @@ func (c *nodeServiceClient) SyncNodesVersionWithCluster(ctx context.Context, in
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *nodeServiceClient) UpdateNodeIsInstalled(ctx context.Context, in *UpdateNodeIsInstalledRequest, opts ...grpc.CallOption) (*UpdateNodeIsInstalledResponse, error) {
|
||||
out := new(UpdateNodeIsInstalledResponse)
|
||||
err := c.cc.Invoke(ctx, "/pb.NodeService/updateNodeIsInstalled", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// NodeServiceServer is the server API for NodeService service.
|
||||
type NodeServiceServer interface {
|
||||
// 创建节点
|
||||
CreateNode(context.Context, *CreateNodeRequest) (*CreateNodeResponse, error)
|
||||
// 节点数量
|
||||
CountAllEnabledNodes(context.Context, *CountAllEnabledNodesRequest) (*CountAllEnabledNodesResponse, error)
|
||||
// 计算匹配的节点数量
|
||||
CountAllEnabledNodesMatch(context.Context, *CountAllEnabledNodesMatchRequest) (*CountAllEnabledNodesMatchResponse, error)
|
||||
// 列出单页节点
|
||||
ListEnabledNodes(context.Context, *ListEnabledNodesRequest) (*ListEnabledNodesResponse, error)
|
||||
ListEnabledNodesMatch(context.Context, *ListEnabledNodesMatchRequest) (*ListEnabledNodesMatchResponse, error)
|
||||
// 禁用节点
|
||||
DisableNode(context.Context, *DisableNodeRequest) (*DisableNodeResponse, error)
|
||||
// 修改节点
|
||||
@@ -1602,6 +1911,8 @@ type NodeServiceServer interface {
|
||||
UpdateNodeStatus(context.Context, *UpdateNodeStatusRequest) (*UpdateNodeStatusResponse, error)
|
||||
// 同步集群中的节点版本
|
||||
SyncNodesVersionWithCluster(context.Context, *SyncNodesVersionWithClusterRequest) (*SyncNodesVersionWithClusterResponse, error)
|
||||
// 修改节点安装状态
|
||||
UpdateNodeIsInstalled(context.Context, *UpdateNodeIsInstalledRequest) (*UpdateNodeIsInstalledResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedNodeServiceServer can be embedded to have forward compatible implementations.
|
||||
@@ -1614,8 +1925,11 @@ func (*UnimplementedNodeServiceServer) CreateNode(context.Context, *CreateNodeRe
|
||||
func (*UnimplementedNodeServiceServer) CountAllEnabledNodes(context.Context, *CountAllEnabledNodesRequest) (*CountAllEnabledNodesResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CountAllEnabledNodes not implemented")
|
||||
}
|
||||
func (*UnimplementedNodeServiceServer) ListEnabledNodes(context.Context, *ListEnabledNodesRequest) (*ListEnabledNodesResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListEnabledNodes not implemented")
|
||||
func (*UnimplementedNodeServiceServer) CountAllEnabledNodesMatch(context.Context, *CountAllEnabledNodesMatchRequest) (*CountAllEnabledNodesMatchResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CountAllEnabledNodesMatch not implemented")
|
||||
}
|
||||
func (*UnimplementedNodeServiceServer) ListEnabledNodesMatch(context.Context, *ListEnabledNodesMatchRequest) (*ListEnabledNodesMatchResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListEnabledNodesMatch not implemented")
|
||||
}
|
||||
func (*UnimplementedNodeServiceServer) DisableNode(context.Context, *DisableNodeRequest) (*DisableNodeResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DisableNode not implemented")
|
||||
@@ -1638,6 +1952,9 @@ func (*UnimplementedNodeServiceServer) UpdateNodeStatus(context.Context, *Update
|
||||
func (*UnimplementedNodeServiceServer) SyncNodesVersionWithCluster(context.Context, *SyncNodesVersionWithClusterRequest) (*SyncNodesVersionWithClusterResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SyncNodesVersionWithCluster not implemented")
|
||||
}
|
||||
func (*UnimplementedNodeServiceServer) UpdateNodeIsInstalled(context.Context, *UpdateNodeIsInstalledRequest) (*UpdateNodeIsInstalledResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateNodeIsInstalled not implemented")
|
||||
}
|
||||
|
||||
func RegisterNodeServiceServer(s *grpc.Server, srv NodeServiceServer) {
|
||||
s.RegisterService(&_NodeService_serviceDesc, srv)
|
||||
@@ -1679,20 +1996,38 @@ func _NodeService_CountAllEnabledNodes_Handler(srv interface{}, ctx context.Cont
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _NodeService_ListEnabledNodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListEnabledNodesRequest)
|
||||
func _NodeService_CountAllEnabledNodesMatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CountAllEnabledNodesMatchRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NodeServiceServer).ListEnabledNodes(ctx, in)
|
||||
return srv.(NodeServiceServer).CountAllEnabledNodesMatch(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.NodeService/ListEnabledNodes",
|
||||
FullMethod: "/pb.NodeService/CountAllEnabledNodesMatch",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NodeServiceServer).ListEnabledNodes(ctx, req.(*ListEnabledNodesRequest))
|
||||
return srv.(NodeServiceServer).CountAllEnabledNodesMatch(ctx, req.(*CountAllEnabledNodesMatchRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _NodeService_ListEnabledNodesMatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListEnabledNodesMatchRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NodeServiceServer).ListEnabledNodesMatch(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.NodeService/ListEnabledNodesMatch",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NodeServiceServer).ListEnabledNodesMatch(ctx, req.(*ListEnabledNodesMatchRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -1831,6 +2166,24 @@ func _NodeService_SyncNodesVersionWithCluster_Handler(srv interface{}, ctx conte
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _NodeService_UpdateNodeIsInstalled_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateNodeIsInstalledRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NodeServiceServer).UpdateNodeIsInstalled(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.NodeService/UpdateNodeIsInstalled",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NodeServiceServer).UpdateNodeIsInstalled(ctx, req.(*UpdateNodeIsInstalledRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _NodeService_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "pb.NodeService",
|
||||
HandlerType: (*NodeServiceServer)(nil),
|
||||
@@ -1844,8 +2197,12 @@ var _NodeService_serviceDesc = grpc.ServiceDesc{
|
||||
Handler: _NodeService_CountAllEnabledNodes_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "listEnabledNodes",
|
||||
Handler: _NodeService_ListEnabledNodes_Handler,
|
||||
MethodName: "countAllEnabledNodesMatch",
|
||||
Handler: _NodeService_CountAllEnabledNodesMatch_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "listEnabledNodesMatch",
|
||||
Handler: _NodeService_ListEnabledNodesMatch_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "disableNode",
|
||||
@@ -1871,6 +2228,10 @@ var _NodeService_serviceDesc = grpc.ServiceDesc{
|
||||
MethodName: "syncNodesVersionWithCluster",
|
||||
Handler: _NodeService_SyncNodesVersionWithCluster_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "updateNodeIsInstalled",
|
||||
Handler: _NodeService_UpdateNodeIsInstalled_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
99
internal/rpc/protos/service_api_node.proto
Normal file
99
internal/rpc/protos/service_api_node.proto
Normal file
@@ -0,0 +1,99 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "./pb";
|
||||
|
||||
package pb;
|
||||
import "model_api_node.proto";
|
||||
|
||||
service APINodeService {
|
||||
// 创建API节点
|
||||
rpc createAPINode (CreateAPINodeRequest) returns (CreateAPINodeResponse);
|
||||
|
||||
// 修改API节点
|
||||
rpc updateAPINode (UpdateAPINodeRequest) returns (UpdateAPINodeResponse);
|
||||
|
||||
// 删除API节点
|
||||
rpc deleteAPINode (DeleteAPINodeRequest) returns (DeleteAPINodeResponse);
|
||||
|
||||
// 列出所有可用API节点
|
||||
rpc findAllEnabledAPINodes (FindAllEnabledAPINodesRequest) returns (FindAllEnabledAPINodesResponse);
|
||||
|
||||
// 计算API节点数量
|
||||
rpc countAllEnabledAPINodes (CountAllEnabledAPINodesRequest) returns (CountAllEnabledAPINodesResponse);
|
||||
|
||||
// 列出单页的API节点
|
||||
rpc listEnabledAPINodes (ListEnabledAPINodesRequest) returns (ListEnabledAPINodesResponse);
|
||||
|
||||
// 根据ID查找节点
|
||||
rpc findEnabledAPINode (FindEnabledAPINodeRequest) returns (FindEnabledAPINodeResponse);
|
||||
}
|
||||
|
||||
// 创建API节点
|
||||
message CreateAPINodeRequest {
|
||||
string name = 1;
|
||||
string description = 2;
|
||||
string host = 3;
|
||||
int32 port = 4;
|
||||
}
|
||||
|
||||
message CreateAPINodeResponse {
|
||||
int64 nodeId = 1;
|
||||
}
|
||||
|
||||
// 修改API节点
|
||||
message UpdateAPINodeRequest {
|
||||
int64 nodeId = 1;
|
||||
string name = 2;
|
||||
string description = 3;
|
||||
string host = 4;
|
||||
int32 port = 5;
|
||||
}
|
||||
|
||||
message UpdateAPINodeResponse {
|
||||
|
||||
}
|
||||
|
||||
// 删除API节点
|
||||
message DeleteAPINodeRequest {
|
||||
int64 nodeId = 1;
|
||||
}
|
||||
|
||||
message DeleteAPINodeResponse {
|
||||
|
||||
}
|
||||
|
||||
// 列出所有可用API节点
|
||||
message FindAllEnabledAPINodesRequest {
|
||||
|
||||
}
|
||||
|
||||
message FindAllEnabledAPINodesResponse {
|
||||
repeated APINode nodes = 1;
|
||||
}
|
||||
|
||||
// 计算API节点数量
|
||||
message CountAllEnabledAPINodesRequest {
|
||||
|
||||
}
|
||||
|
||||
message CountAllEnabledAPINodesResponse {
|
||||
int64 count = 1;
|
||||
}
|
||||
|
||||
// 列出单页的API节点
|
||||
message ListEnabledAPINodesRequest {
|
||||
int64 offset = 1;
|
||||
int64 size = 2;
|
||||
}
|
||||
|
||||
message ListEnabledAPINodesResponse {
|
||||
repeated APINode nodes = 1;
|
||||
}
|
||||
|
||||
// 根据ID查找节点
|
||||
message FindEnabledAPINodeRequest {
|
||||
int64 nodeId = 1;
|
||||
}
|
||||
|
||||
message FindEnabledAPINodeResponse {
|
||||
APINode node = 1;
|
||||
}
|
||||
@@ -12,8 +12,11 @@ service NodeService {
|
||||
// 节点数量
|
||||
rpc countAllEnabledNodes (CountAllEnabledNodesRequest) returns (CountAllEnabledNodesResponse);
|
||||
|
||||
// 计算匹配的节点数量
|
||||
rpc countAllEnabledNodesMatch (CountAllEnabledNodesMatchRequest) returns (CountAllEnabledNodesMatchResponse);
|
||||
|
||||
// 列出单页节点
|
||||
rpc listEnabledNodes (ListEnabledNodesRequest) returns (ListEnabledNodesResponse);
|
||||
rpc listEnabledNodesMatch (ListEnabledNodesMatchRequest) returns (ListEnabledNodesMatchResponse);
|
||||
|
||||
// 禁用节点
|
||||
rpc disableNode (DisableNodeRequest) returns (DisableNodeResponse);
|
||||
@@ -35,6 +38,9 @@ service NodeService {
|
||||
|
||||
// 同步集群中的节点版本
|
||||
rpc syncNodesVersionWithCluster (SyncNodesVersionWithClusterRequest) returns (SyncNodesVersionWithClusterResponse);
|
||||
|
||||
// 修改节点安装状态
|
||||
rpc updateNodeIsInstalled (UpdateNodeIsInstalledRequest) returns (UpdateNodeIsInstalledResponse);
|
||||
}
|
||||
|
||||
// 创建节点
|
||||
@@ -58,12 +64,13 @@ message CountAllEnabledNodesResponse {
|
||||
}
|
||||
|
||||
// 列出单页节点
|
||||
message ListEnabledNodesRequest {
|
||||
message ListEnabledNodesMatchRequest {
|
||||
int64 offset = 1;
|
||||
int64 size = 2;
|
||||
int64 clusterId = 3;
|
||||
}
|
||||
|
||||
message ListEnabledNodesResponse {
|
||||
message ListEnabledNodesMatchResponse {
|
||||
repeated Node nodes = 1;
|
||||
}
|
||||
|
||||
@@ -131,4 +138,23 @@ message SyncNodesVersionWithClusterRequest {
|
||||
}
|
||||
|
||||
message SyncNodesVersionWithClusterResponse {
|
||||
}
|
||||
|
||||
// 计算匹配的节点数量
|
||||
message CountAllEnabledNodesMatchRequest {
|
||||
int64 clusterId = 1;
|
||||
}
|
||||
|
||||
message CountAllEnabledNodesMatchResponse {
|
||||
int64 count = 1;
|
||||
}
|
||||
|
||||
// 修改节点安装状态
|
||||
message UpdateNodeIsInstalledRequest {
|
||||
int64 nodeId = 1;
|
||||
bool isInstalled = 2;
|
||||
}
|
||||
|
||||
message UpdateNodeIsInstalledResponse {
|
||||
|
||||
}
|
||||
@@ -5,11 +5,29 @@ package pb;
|
||||
import "model_node_cluster.proto";
|
||||
|
||||
service NodeClusterService {
|
||||
// 创建集群
|
||||
rpc createNodeCluster (CreateNodeClusterRequest) returns (CreateNodeClusterResponse);
|
||||
|
||||
// 修改集群
|
||||
rpc updateNodeCluster (UpdateNodeClusterRequest) returns (UpdateNodeClusterResponse);
|
||||
|
||||
// 禁用集群
|
||||
rpc disableNodeCluster (DisableNodeClusterRequest) returns (DisableNodeClusterResponse);
|
||||
|
||||
// 查找单个集群信息
|
||||
rpc findEnabledNodeCluster (FindEnabledNodeClusterRequest) returns (FindEnabledNodeClusterResponse);
|
||||
|
||||
// 获取所有集群的信息
|
||||
rpc findAllEnabledClusters (FindAllEnabledNodeClustersRequest) returns (FindAllEnabledNodeClustersResponse);
|
||||
rpc findAllEnabledNodeClusters (FindAllEnabledNodeClustersRequest) returns (FindAllEnabledNodeClustersResponse);
|
||||
|
||||
// 获取变更的集群
|
||||
rpc findAllChangedClusters (FindAllChangedClustersRequest) returns (FindAllChangedClustersResponse);
|
||||
rpc findAllChangedNodeClusters (FindAllChangedNodeClustersRequest) returns (FindAllChangedNodeClustersResponse);
|
||||
|
||||
// 计算所有集群数量
|
||||
rpc countAllEnabledNodeClusters (CountAllEnabledNodeClustersRequest) returns (CountAllEnabledNodeClustersResponse);
|
||||
|
||||
// 列出单页集群
|
||||
rpc listEnabledNodeClusters (ListEnabledNodeClustersRequest) returns (ListEnabledNodeClustersResponse);
|
||||
}
|
||||
|
||||
// 获取所有集群的信息
|
||||
@@ -22,10 +40,70 @@ message FindAllEnabledNodeClustersResponse {
|
||||
}
|
||||
|
||||
// 获取变更的集群
|
||||
message FindAllChangedClustersRequest {
|
||||
message FindAllChangedNodeClustersRequest {
|
||||
|
||||
}
|
||||
|
||||
message FindAllChangedClustersResponse {
|
||||
message FindAllChangedNodeClustersResponse {
|
||||
repeated NodeCluster clusters = 1;
|
||||
}
|
||||
|
||||
// 创建集群
|
||||
message CreateNodeClusterRequest {
|
||||
string name = 1;
|
||||
int64 grantId = 2;
|
||||
string installDir = 3;
|
||||
}
|
||||
|
||||
message CreateNodeClusterResponse {
|
||||
int64 clusterId = 1;
|
||||
}
|
||||
|
||||
// 修改集群
|
||||
message UpdateNodeClusterRequest {
|
||||
int64 clusterId = 1;
|
||||
string name = 2;
|
||||
int64 grantId = 3;
|
||||
string installDir = 4;
|
||||
}
|
||||
|
||||
message UpdateNodeClusterResponse {
|
||||
|
||||
}
|
||||
|
||||
// 禁用集群
|
||||
message DisableNodeClusterRequest {
|
||||
int64 clusterId = 1;
|
||||
}
|
||||
|
||||
message DisableNodeClusterResponse {
|
||||
|
||||
}
|
||||
|
||||
// 查找单个集群信息
|
||||
message FindEnabledNodeClusterRequest {
|
||||
int64 clusterId = 1;
|
||||
}
|
||||
|
||||
message FindEnabledNodeClusterResponse {
|
||||
NodeCluster cluster = 1;
|
||||
}
|
||||
|
||||
// 计算所有集群数量
|
||||
message CountAllEnabledNodeClustersRequest {
|
||||
|
||||
}
|
||||
|
||||
message CountAllEnabledNodeClustersResponse {
|
||||
int64 count = 1;
|
||||
}
|
||||
|
||||
// 列出单页集群
|
||||
message ListEnabledNodeClustersRequest {
|
||||
int64 offset = 1;
|
||||
int64 size = 2;
|
||||
}
|
||||
|
||||
message ListEnabledNodeClustersResponse {
|
||||
repeated NodeCluster clusters = 1;
|
||||
}
|
||||
@@ -24,6 +24,7 @@ type RPCClient struct {
|
||||
nodeClusterClients []pb.NodeClusterServiceClient
|
||||
nodeIPAddressClients []pb.NodeIPAddressServiceClient
|
||||
serverClients []pb.ServerServiceClient
|
||||
apiNodeClients []pb.APINodeServiceClient
|
||||
}
|
||||
|
||||
func NewRPCClient(apiConfig *configs.APIConfig) (*RPCClient, error) {
|
||||
@@ -37,6 +38,7 @@ func NewRPCClient(apiConfig *configs.APIConfig) (*RPCClient, error) {
|
||||
nodeClusterClients := []pb.NodeClusterServiceClient{}
|
||||
nodeIPAddressClients := []pb.NodeIPAddressServiceClient{}
|
||||
serverClients := []pb.ServerServiceClient{}
|
||||
apiNodeClients := []pb.APINodeServiceClient{}
|
||||
|
||||
conns := []*grpc.ClientConn{}
|
||||
for _, endpoint := range apiConfig.RPC.Endpoints {
|
||||
@@ -58,6 +60,7 @@ func NewRPCClient(apiConfig *configs.APIConfig) (*RPCClient, error) {
|
||||
nodeClusterClients = append(nodeClusterClients, pb.NewNodeClusterServiceClient(conn))
|
||||
nodeIPAddressClients = append(nodeIPAddressClients, pb.NewNodeIPAddressServiceClient(conn))
|
||||
serverClients = append(serverClients, pb.NewServerServiceClient(conn))
|
||||
apiNodeClients = append(apiNodeClients, pb.NewAPINodeServiceClient(conn))
|
||||
}
|
||||
|
||||
return &RPCClient{
|
||||
@@ -68,6 +71,7 @@ func NewRPCClient(apiConfig *configs.APIConfig) (*RPCClient, error) {
|
||||
nodeClusterClients: nodeClusterClients,
|
||||
nodeIPAddressClients: nodeIPAddressClients,
|
||||
serverClients: serverClients,
|
||||
apiNodeClients: apiNodeClients,
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -113,6 +117,13 @@ func (this *RPCClient) ServerRPC() pb.ServerServiceClient {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (this *RPCClient) APINodeRPC() pb.APINodeServiceClient {
|
||||
if len(this.serverClients) > 0 {
|
||||
return this.apiNodeClients[rands.Int(0, len(this.apiNodeClients)-1)]
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (this *RPCClient) Context(adminId int64) context.Context {
|
||||
ctx := context.Background()
|
||||
m := maps.Map{
|
||||
|
||||
23
internal/web/actions/default/api/helper.go
Normal file
23
internal/web/actions/default/api/helper.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
"github.com/iwind/TeaGo/actions"
|
||||
)
|
||||
|
||||
type Helper struct {
|
||||
}
|
||||
|
||||
func NewHelper() *Helper {
|
||||
return &Helper{}
|
||||
}
|
||||
|
||||
func (this *Helper) BeforeAction(action *actions.ActionObject) {
|
||||
action.Data["teaMenu"] = "api"
|
||||
|
||||
selectedTabbar, _ := action.Data["mainTab"]
|
||||
|
||||
tabbar := actionutils.NewTabbar()
|
||||
tabbar.Add("API节点", "", "/api", "", selectedTabbar == "node")
|
||||
actionutils.SetTabbar(action, tabbar)
|
||||
}
|
||||
51
internal/web/actions/default/api/index.go
Normal file
51
internal/web/actions/default/api/index.go
Normal file
@@ -0,0 +1,51 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/rpc/pb"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
"github.com/iwind/TeaGo/maps"
|
||||
)
|
||||
|
||||
type IndexAction struct {
|
||||
actionutils.ParentAction
|
||||
}
|
||||
|
||||
func (this *IndexAction) Init() {
|
||||
this.Nav("", "node", "index")
|
||||
}
|
||||
|
||||
func (this *IndexAction) RunGet(params struct{}) {
|
||||
countResp, err := this.RPC().APINodeRPC().CountAllEnabledAPINodes(this.AdminContext(), &pb.CountAllEnabledAPINodesRequest{})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
count := countResp.Count
|
||||
page := this.NewPage(count)
|
||||
this.Data["page"] = page.AsHTML()
|
||||
|
||||
nodeMaps := []maps.Map{}
|
||||
if count > 0 {
|
||||
nodesResp, err := this.RPC().APINodeRPC().ListEnabledAPINodes(this.AdminContext(), &pb.ListEnabledAPINodesRequest{
|
||||
Offset: page.Offset,
|
||||
Size: page.Size,
|
||||
})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
|
||||
for _, node := range nodesResp.Nodes {
|
||||
nodeMaps = append(nodeMaps, maps.Map{
|
||||
"id": node.Id,
|
||||
"isOn": node.IsOn,
|
||||
"name": node.Name,
|
||||
"host": node.Host,
|
||||
"port": node.Port,
|
||||
})
|
||||
}
|
||||
}
|
||||
this.Data["nodes"] = nodeMaps
|
||||
|
||||
this.Show()
|
||||
}
|
||||
19
internal/web/actions/default/api/init.go
Normal file
19
internal/web/actions/default/api/init.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/api/node"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/helpers"
|
||||
"github.com/iwind/TeaGo"
|
||||
)
|
||||
|
||||
func init() {
|
||||
TeaGo.BeforeStart(func(server *TeaGo.Server) {
|
||||
server.
|
||||
Helper(helpers.NewUserMustAuth()).
|
||||
Helper(NewHelper()).
|
||||
Prefix("/api").
|
||||
Get("", new(IndexAction)).
|
||||
GetPost("/node/create", new(node.CreateAction)).
|
||||
EndAll()
|
||||
})
|
||||
}
|
||||
50
internal/web/actions/default/api/node/create.go
Normal file
50
internal/web/actions/default/api/node/create.go
Normal file
@@ -0,0 +1,50 @@
|
||||
package node
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/rpc/pb"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
"github.com/iwind/TeaGo/actions"
|
||||
)
|
||||
|
||||
type CreateAction struct {
|
||||
actionutils.ParentAction
|
||||
}
|
||||
|
||||
func (this *CreateAction) Init() {
|
||||
this.Nav("", "node", "create")
|
||||
}
|
||||
|
||||
func (this *CreateAction) RunGet(params struct{}) {
|
||||
this.Show()
|
||||
}
|
||||
|
||||
func (this *CreateAction) RunPost(params struct {
|
||||
Name string
|
||||
Host string
|
||||
Port int
|
||||
Description string
|
||||
|
||||
Must *actions.Must
|
||||
}) {
|
||||
params.Must.
|
||||
Field("name", params.Name).
|
||||
Require("请输入API节点").
|
||||
Field("host", params.Host).
|
||||
Require("请输入主机地址").
|
||||
Field("port", params.Port).
|
||||
Gt(0, "端口不能小于1").
|
||||
Lte(65535, "端口不能大于65535")
|
||||
|
||||
_, err := this.RPC().APINodeRPC().CreateAPINode(this.AdminContext(), &pb.CreateAPINodeRequest{
|
||||
Name: params.Name,
|
||||
Description: params.Description,
|
||||
Host: params.Host,
|
||||
Port: int32(params.Port),
|
||||
})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
|
||||
this.Success()
|
||||
}
|
||||
73
internal/web/actions/default/api/node/helper.go
Normal file
73
internal/web/actions/default/api/node/helper.go
Normal file
@@ -0,0 +1,73 @@
|
||||
package node
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/rpc"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/rpc/pb"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
"github.com/iwind/TeaGo/actions"
|
||||
"github.com/iwind/TeaGo/logs"
|
||||
"github.com/iwind/TeaGo/maps"
|
||||
"net/http"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
type Helper struct {
|
||||
}
|
||||
|
||||
func NewHelper() *Helper {
|
||||
return &Helper{}
|
||||
}
|
||||
|
||||
func (this *Helper) BeforeAction(action *actions.ActionObject) (goNext bool) {
|
||||
if action.Request.Method != http.MethodGet {
|
||||
return true
|
||||
}
|
||||
|
||||
action.Data["teaMenu"] = "api"
|
||||
|
||||
nodeId := action.ParamInt64("nodeId")
|
||||
nodeIdString := strconv.FormatInt(nodeId, 10)
|
||||
|
||||
// 节点信息
|
||||
rpcClient, err := rpc.SharedRPC()
|
||||
if err != nil {
|
||||
logs.Error(err)
|
||||
return
|
||||
}
|
||||
nodeResp, err := rpcClient.APINodeRPC().FindEnabledAPINode(rpcClient.Context(action.Context.GetInt64("adminId")), &pb.FindEnabledAPINodeRequest{NodeId: nodeId})
|
||||
if err != nil {
|
||||
action.WriteString(err.Error())
|
||||
return
|
||||
}
|
||||
if nodeResp.Node == nil {
|
||||
action.WriteString("node not found")
|
||||
return
|
||||
}
|
||||
node := nodeResp.Node
|
||||
|
||||
// 顶部Tab栏
|
||||
selectedTabbar, _ := action.Data["mainTab"]
|
||||
tabbar := actionutils.NewTabbar()
|
||||
tabbar.Add("当前节点:"+node.Name, "", "/api", "left long alternate arrow", false)
|
||||
tabbar.Add("设置", "", "/api/node/settings?nodeId="+nodeIdString, "setting", selectedTabbar == "setting")
|
||||
actionutils.SetTabbar(action, tabbar)
|
||||
|
||||
// 左侧菜单栏
|
||||
secondMenuItem := action.Data.GetString("secondMenuItem")
|
||||
switch selectedTabbar {
|
||||
case "setting":
|
||||
action.Data["leftMenuItems"] = this.createSettingMenu(nodeIdString, secondMenuItem)
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
// 设置相关菜单
|
||||
func (this *Helper) createSettingMenu(nodeIdString string, selectedItem string) (items []maps.Map) {
|
||||
items = append(items, maps.Map{
|
||||
"name": "基础设置",
|
||||
"url": "/api/node/settings?nodeId=" + nodeIdString,
|
||||
"isActive": selectedItem == "basic",
|
||||
})
|
||||
return
|
||||
}
|
||||
20
internal/web/actions/default/api/node/init.go
Normal file
20
internal/web/actions/default/api/node/init.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package node
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/helpers"
|
||||
"github.com/iwind/TeaGo"
|
||||
)
|
||||
|
||||
func init() {
|
||||
TeaGo.BeforeStart(func(server *TeaGo.Server) {
|
||||
server.
|
||||
Helper(helpers.NewUserMustAuth()).
|
||||
Helper(NewHelper()).
|
||||
Prefix("/api/node").
|
||||
|
||||
// 节点相关
|
||||
GetPost("/settings", new(SettingsAction)).
|
||||
|
||||
EndAll()
|
||||
})
|
||||
}
|
||||
78
internal/web/actions/default/api/node/settings.go
Normal file
78
internal/web/actions/default/api/node/settings.go
Normal file
@@ -0,0 +1,78 @@
|
||||
package node
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/rpc/pb"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
"github.com/iwind/TeaGo/actions"
|
||||
"github.com/iwind/TeaGo/maps"
|
||||
)
|
||||
|
||||
type SettingsAction struct {
|
||||
actionutils.ParentAction
|
||||
}
|
||||
|
||||
func (this *SettingsAction) Init() {
|
||||
this.Nav("", "setting", "")
|
||||
this.SecondMenu("basic")
|
||||
}
|
||||
|
||||
func (this *SettingsAction) RunGet(params struct {
|
||||
NodeId int64
|
||||
}) {
|
||||
nodeResp, err := this.RPC().APINodeRPC().FindEnabledAPINode(this.AdminContext(), &pb.FindEnabledAPINodeRequest{
|
||||
NodeId: params.NodeId,
|
||||
})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
node := nodeResp.Node
|
||||
if node == nil {
|
||||
this.WriteString("要操作的节点不存在")
|
||||
return
|
||||
}
|
||||
|
||||
this.Data["node"] = maps.Map{
|
||||
"id": node.Id,
|
||||
"name": node.Name,
|
||||
"description": node.Description,
|
||||
"host": node.Host,
|
||||
"port": node.Port,
|
||||
}
|
||||
|
||||
this.Show()
|
||||
}
|
||||
|
||||
// 保存基础设置
|
||||
func (this *SettingsAction) RunPost(params struct {
|
||||
NodeId int64
|
||||
Name string
|
||||
Host string
|
||||
Port int
|
||||
Description string
|
||||
|
||||
Must *actions.Must
|
||||
}) {
|
||||
params.Must.
|
||||
Field("name", params.Name).
|
||||
Require("请输入API节点").
|
||||
Field("host", params.Host).
|
||||
Require("请输入主机地址").
|
||||
Field("port", params.Port).
|
||||
Gt(0, "端口不能小于1").
|
||||
Lte(65535, "端口不能大于65535")
|
||||
|
||||
_, err := this.RPC().APINodeRPC().UpdateAPINode(this.AdminContext(), &pb.UpdateAPINodeRequest{
|
||||
NodeId: params.NodeId,
|
||||
Name: params.Name,
|
||||
Description: params.Description,
|
||||
Host: params.Host,
|
||||
Port: int32(params.Port),
|
||||
})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
|
||||
this.Success()
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package nodes
|
||||
package cluster
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
@@ -16,11 +16,16 @@ type IndexAction struct {
|
||||
}
|
||||
|
||||
func (this *IndexAction) Init() {
|
||||
this.Nav("", "node", "index")
|
||||
this.Nav("", "node", "")
|
||||
this.SecondMenu("nodes")
|
||||
}
|
||||
|
||||
func (this *IndexAction) RunGet(params struct{}) {
|
||||
countResp, err := this.RPC().NodeRPC().CountAllEnabledNodes(this.AdminContext(), &pb.CountAllEnabledNodesRequest{})
|
||||
func (this *IndexAction) RunGet(params struct {
|
||||
ClusterId int64
|
||||
}) {
|
||||
countResp, err := this.RPC().NodeRPC().CountAllEnabledNodesMatch(this.AdminContext(), &pb.CountAllEnabledNodesMatchRequest{
|
||||
ClusterId: params.ClusterId,
|
||||
})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
@@ -29,9 +34,10 @@ func (this *IndexAction) RunGet(params struct{}) {
|
||||
page := this.NewPage(countResp.Count)
|
||||
this.Data["page"] = page.AsHTML()
|
||||
|
||||
nodesResp, err := this.RPC().NodeRPC().ListEnabledNodes(this.AdminContext(), &pb.ListEnabledNodesRequest{
|
||||
Offset: page.Offset,
|
||||
Size: page.Size,
|
||||
nodesResp, err := this.RPC().NodeRPC().ListEnabledNodesMatch(this.AdminContext(), &pb.ListEnabledNodesMatchRequest{
|
||||
Offset: page.Offset,
|
||||
Size: page.Size,
|
||||
ClusterId: params.ClusterId,
|
||||
})
|
||||
nodeMaps := []maps.Map{}
|
||||
for _, node := range nodesResp.Nodes {
|
||||
@@ -62,8 +68,9 @@ func (this *IndexAction) RunGet(params struct{}) {
|
||||
}
|
||||
|
||||
nodeMaps = append(nodeMaps, maps.Map{
|
||||
"id": node.Id,
|
||||
"name": node.Name,
|
||||
"id": node.Id,
|
||||
"name": node.Name,
|
||||
"isInstalled": node.IsInstalled,
|
||||
"status": maps.Map{
|
||||
"isActive": status.IsActive,
|
||||
"updatedAt": status.UpdatedAt,
|
||||
26
internal/web/actions/default/clusters/cluster/init.go
Normal file
26
internal/web/actions/default/clusters/cluster/init.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package cluster
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/cluster/node"
|
||||
clusters "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/clusterutils"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/helpers"
|
||||
"github.com/iwind/TeaGo"
|
||||
)
|
||||
|
||||
func init() {
|
||||
TeaGo.BeforeStart(func(server *TeaGo.Server) {
|
||||
server.
|
||||
Helper(helpers.NewUserMustAuth()).
|
||||
Helper(clusters.NewClusterHelper()).
|
||||
Prefix("/clusters/cluster").
|
||||
Get("", new(IndexAction)).
|
||||
|
||||
// 节点相关
|
||||
Get("/node", new(node.NodeAction)).
|
||||
GetPost("/node/create", new(node.CreateAction)).
|
||||
GetPost("/node/update", new(node.UpdateAction)).
|
||||
GetPost("/node/install", new(node.InstallAction)).
|
||||
Post("/node/updateInstallStatus", new(node.UpdateInstallStatusAction)).
|
||||
EndAll()
|
||||
})
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package nodes
|
||||
package node
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
@@ -13,28 +13,11 @@ type CreateAction struct {
|
||||
}
|
||||
|
||||
func (this *CreateAction) Init() {
|
||||
this.Nav("", "node", "create")
|
||||
this.Nav("", "node", "")
|
||||
this.SecondMenu("nodes")
|
||||
}
|
||||
|
||||
func (this *CreateAction) RunGet(params struct{}) {
|
||||
// 所有集群
|
||||
resp, err := this.RPC().NodeClusterRPC().FindAllEnabledClusters(this.AdminContext(), &pb.FindAllEnabledNodeClustersRequest{})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
}
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
clusterMaps := []maps.Map{}
|
||||
for _, cluster := range resp.Clusters {
|
||||
clusterMaps = append(clusterMaps, maps.Map{
|
||||
"id": cluster.Id,
|
||||
"name": cluster.Name,
|
||||
})
|
||||
}
|
||||
this.Data["clusters"] = clusterMaps
|
||||
|
||||
this.Show()
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
package node
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/rpc/pb"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
"github.com/iwind/TeaGo/maps"
|
||||
)
|
||||
|
||||
type InstallAction struct {
|
||||
actionutils.ParentAction
|
||||
}
|
||||
|
||||
func (this *InstallAction) Init() {
|
||||
this.Nav("", "node", "install")
|
||||
this.SecondMenu("nodes")
|
||||
}
|
||||
|
||||
func (this *InstallAction) RunGet(params struct {
|
||||
NodeId int64
|
||||
}) {
|
||||
this.Data["nodeId"] = params.NodeId
|
||||
|
||||
// 节点
|
||||
nodeResp, err := this.RPC().NodeRPC().FindEnabledNode(this.AdminContext(), &pb.FindEnabledNodeRequest{NodeId: params.NodeId})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
node := nodeResp.Node
|
||||
if node == nil {
|
||||
this.WriteString("找不到要操作的节点")
|
||||
return
|
||||
}
|
||||
|
||||
// 集群
|
||||
var clusterMap maps.Map = nil
|
||||
if node.Cluster != nil {
|
||||
clusterId := node.Cluster.Id
|
||||
clusterResp, err := this.RPC().NodeClusterRPC().FindEnabledNodeCluster(this.AdminContext(), &pb.FindEnabledNodeClusterRequest{ClusterId: clusterId})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
cluster := clusterResp.Cluster
|
||||
if cluster != nil {
|
||||
clusterMap = maps.Map{
|
||||
"id": cluster.Id,
|
||||
"name": cluster.Name,
|
||||
"installDir": cluster.InstallDir,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.Data["node"] = maps.Map{
|
||||
"id": node.Id,
|
||||
"name": node.Name,
|
||||
"installDir": node.InstallDir,
|
||||
"isInstalled": node.IsInstalled,
|
||||
"uniqueId": node.UniqueId,
|
||||
"secret": node.Secret,
|
||||
"cluster": clusterMap,
|
||||
}
|
||||
|
||||
this.Show()
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package nodes
|
||||
package node
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
@@ -13,7 +13,8 @@ type NodeAction struct {
|
||||
}
|
||||
|
||||
func (this *NodeAction) Init() {
|
||||
this.Nav("", "node", "index")
|
||||
this.Nav("", "node", "node")
|
||||
this.SecondMenu("nodes")
|
||||
}
|
||||
|
||||
func (this *NodeAction) RunGet(params struct {
|
||||
@@ -34,9 +35,19 @@ func (this *NodeAction) RunGet(params struct {
|
||||
|
||||
var clusterMap maps.Map = nil
|
||||
if node.Cluster != nil {
|
||||
clusterMap = maps.Map{
|
||||
"id": node.Cluster.Id,
|
||||
"name": node.Cluster.Name,
|
||||
clusterId := node.Cluster.Id
|
||||
clusterResp, err := this.RPC().NodeClusterRPC().FindEnabledNodeCluster(this.AdminContext(), &pb.FindEnabledNodeClusterRequest{ClusterId: clusterId})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
cluster := clusterResp.Cluster
|
||||
if cluster != nil {
|
||||
clusterMap = maps.Map{
|
||||
"id": cluster.Id,
|
||||
"name": cluster.Name,
|
||||
"installDir": cluster.InstallDir,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,6 +111,10 @@ func (this *NodeAction) RunGet(params struct {
|
||||
"ipAddresses": ipAddressMaps,
|
||||
"cluster": clusterMap,
|
||||
"login": loginMap,
|
||||
"installDir": node.InstallDir,
|
||||
"isInstalled": node.IsInstalled,
|
||||
"uniqueId": node.UniqueId,
|
||||
"secret": node.Secret,
|
||||
}
|
||||
|
||||
this.Show()
|
||||
@@ -1,4 +1,4 @@
|
||||
package nodes
|
||||
package node
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
@@ -14,7 +14,8 @@ type UpdateAction struct {
|
||||
}
|
||||
|
||||
func (this *UpdateAction) Init() {
|
||||
this.Nav("", "node", "index")
|
||||
this.Nav("", "node", "update")
|
||||
this.SecondMenu("nodes")
|
||||
}
|
||||
|
||||
func (this *UpdateAction) RunGet(params struct {
|
||||
@@ -104,7 +105,7 @@ func (this *UpdateAction) RunGet(params struct {
|
||||
}
|
||||
|
||||
// 所有集群
|
||||
resp, err := this.RPC().NodeClusterRPC().FindAllEnabledClusters(this.AdminContext(), &pb.FindAllEnabledNodeClustersRequest{})
|
||||
resp, err := this.RPC().NodeClusterRPC().FindAllEnabledNodeClusters(this.AdminContext(), &pb.FindAllEnabledNodeClustersRequest{})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package node
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/rpc/pb"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
)
|
||||
|
||||
type UpdateInstallStatusAction struct {
|
||||
actionutils.ParentAction
|
||||
}
|
||||
|
||||
func (this *UpdateInstallStatusAction) RunPost(params struct {
|
||||
NodeId int64
|
||||
IsInstalled bool
|
||||
}) {
|
||||
_, err := this.RPC().NodeRPC().UpdateNodeIsInstalled(this.AdminContext(), &pb.UpdateNodeIsInstalledRequest{
|
||||
NodeId: params.NodeId,
|
||||
IsInstalled: params.IsInstalled,
|
||||
})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
|
||||
this.Success()
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package settings
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/rpc/pb"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/nodes/grants/grantutils"
|
||||
"github.com/iwind/TeaGo/actions"
|
||||
"github.com/iwind/TeaGo/maps"
|
||||
)
|
||||
|
||||
type IndexAction struct {
|
||||
actionutils.ParentAction
|
||||
}
|
||||
|
||||
func (this *IndexAction) Init() {
|
||||
this.Nav("", "setting", "")
|
||||
this.SecondMenu("basic")
|
||||
}
|
||||
|
||||
func (this *IndexAction) RunGet(params struct {
|
||||
ClusterId int64
|
||||
}) {
|
||||
clusterResp, err := this.RPC().NodeClusterRPC().FindEnabledNodeCluster(this.AdminContext(), &pb.FindEnabledNodeClusterRequest{ClusterId: params.ClusterId})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
cluster := clusterResp.Cluster
|
||||
if cluster == nil {
|
||||
this.WriteString("not found cluster")
|
||||
return
|
||||
}
|
||||
|
||||
// 认证
|
||||
var grantMap interface{} = nil
|
||||
|
||||
if cluster.GrantId > 0 {
|
||||
grantResp, err := this.RPC().NodeGrantRPC().FindEnabledGrant(this.AdminContext(), &pb.FindEnabledGrantRequest{GrantId: cluster.GrantId})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
grant := grantResp.Grant
|
||||
if grant != nil {
|
||||
grantMap = maps.Map{
|
||||
"id": grant.Id,
|
||||
"name": grant.Name,
|
||||
"method": grant.Method,
|
||||
"methodName": grantutils.FindGrantMethodName(grant.Method),
|
||||
}
|
||||
}
|
||||
}
|
||||
this.Data["grant"] = grantMap
|
||||
|
||||
this.Data["cluster"] = maps.Map{
|
||||
"id": cluster.Id,
|
||||
"name": cluster.Name,
|
||||
"installDir": cluster.InstallDir,
|
||||
}
|
||||
|
||||
this.Show()
|
||||
}
|
||||
|
||||
// 保存设置
|
||||
func (this *IndexAction) RunPost(params struct {
|
||||
ClusterId int64
|
||||
Name string
|
||||
GrantId int64
|
||||
InstallDir string
|
||||
|
||||
Must *actions.Must
|
||||
}) {
|
||||
params.Must.
|
||||
Field("name", params.Name).
|
||||
Require("请输入集群名称")
|
||||
|
||||
_, err := this.RPC().NodeClusterRPC().UpdateNodeCluster(this.AdminContext(), &pb.UpdateNodeClusterRequest{
|
||||
ClusterId: params.ClusterId,
|
||||
Name: params.Name,
|
||||
GrantId: params.GrantId,
|
||||
InstallDir: params.InstallDir,
|
||||
})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
|
||||
this.Success()
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package settings
|
||||
|
||||
import (
|
||||
clusters "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/clusterutils"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/helpers"
|
||||
"github.com/iwind/TeaGo"
|
||||
)
|
||||
|
||||
func init() {
|
||||
TeaGo.BeforeStart(func(server *TeaGo.Server) {
|
||||
server.
|
||||
Helper(helpers.NewUserMustAuth()).
|
||||
Helper(clusters.NewClusterHelper()).
|
||||
Prefix("/clusters/cluster/settings").
|
||||
GetPost("", new(IndexAction)).
|
||||
EndAll()
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package clusters
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/rpc"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/rpc/pb"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
"github.com/iwind/TeaGo/actions"
|
||||
"github.com/iwind/TeaGo/logs"
|
||||
"github.com/iwind/TeaGo/maps"
|
||||
"net/http"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
type ClusterHelper struct {
|
||||
}
|
||||
|
||||
func NewClusterHelper() *ClusterHelper {
|
||||
return &ClusterHelper{}
|
||||
}
|
||||
|
||||
func (this *ClusterHelper) BeforeAction(action *actions.ActionObject) {
|
||||
if action.Request.Method != http.MethodGet {
|
||||
return
|
||||
}
|
||||
|
||||
action.Data["teaMenu"] = "clusters"
|
||||
|
||||
selectedTabbar := action.Data.GetString("mainTab")
|
||||
clusterId := action.ParamInt64("clusterId")
|
||||
clusterIdString := strconv.FormatInt(clusterId, 10)
|
||||
action.Data["clusterId"] = clusterId
|
||||
|
||||
rpcClient, err := rpc.SharedRPC()
|
||||
if err != nil {
|
||||
logs.Error(err)
|
||||
return
|
||||
}
|
||||
|
||||
clusterResp, err := rpcClient.NodeClusterRPC().FindEnabledNodeCluster(rpcClient.Context(action.Context.GetInt64("adminId")), &pb.FindEnabledNodeClusterRequest{ClusterId: clusterId})
|
||||
if err != nil {
|
||||
logs.Error(err)
|
||||
return
|
||||
}
|
||||
cluster := clusterResp.Cluster
|
||||
if cluster == nil {
|
||||
action.WriteString("can not find cluster")
|
||||
return
|
||||
}
|
||||
|
||||
tabbar := actionutils.NewTabbar()
|
||||
tabbar.Add("当前集群:"+cluster.Name, "", "/clusters", "left long alternate arrow", false)
|
||||
tabbar.Add("节点", "", "/clusters/cluster?clusterId="+clusterIdString, "server", selectedTabbar == "node")
|
||||
tabbar.Add("设置", "", "/clusters/cluster/settings?clusterId="+clusterIdString, "setting", selectedTabbar == "setting")
|
||||
actionutils.SetTabbar(action, tabbar)
|
||||
|
||||
// 左侧菜单
|
||||
secondMenuItem := action.Data.GetString("secondMenuItem")
|
||||
switch selectedTabbar {
|
||||
case "setting":
|
||||
action.Data["leftMenuItems"] = this.createSettingMenu(clusterIdString, secondMenuItem)
|
||||
case "node":
|
||||
action.Data["leftMenuItems"] = this.createNodeMenu(clusterIdString, secondMenuItem)
|
||||
}
|
||||
}
|
||||
|
||||
// 节点菜单
|
||||
func (this *ClusterHelper) createNodeMenu(clusterId string, selectedItem string) (items []maps.Map) {
|
||||
items = append(items, maps.Map{
|
||||
"name": "节点列表",
|
||||
"url": "/clusters/cluster?clusterId=" + clusterId,
|
||||
"isActive": selectedItem == "nodes",
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
// 设置菜单
|
||||
func (this *ClusterHelper) createSettingMenu(clusterId string, selectedItem string) (items []maps.Map) {
|
||||
items = append(items, maps.Map{
|
||||
"name": "基础设置",
|
||||
"url": "/clusters/cluster/settings?clusterId=" + clusterId,
|
||||
"isActive": selectedItem == "basic",
|
||||
})
|
||||
return
|
||||
}
|
||||
43
internal/web/actions/default/clusters/create.go
Normal file
43
internal/web/actions/default/clusters/create.go
Normal file
@@ -0,0 +1,43 @@
|
||||
package clusters
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/rpc/pb"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
"github.com/iwind/TeaGo/actions"
|
||||
)
|
||||
|
||||
type CreateAction struct {
|
||||
actionutils.ParentAction
|
||||
}
|
||||
|
||||
func (this *CreateAction) Init() {
|
||||
this.Nav("", "cluster", "create")
|
||||
}
|
||||
|
||||
func (this *CreateAction) RunGet(params struct{}) {
|
||||
this.Show()
|
||||
}
|
||||
|
||||
func (this *CreateAction) RunPost(params struct {
|
||||
Name string
|
||||
GrantId int64
|
||||
InstallDir string
|
||||
|
||||
Must *actions.Must
|
||||
}) {
|
||||
params.Must.
|
||||
Field("name", params.Name).
|
||||
Require("请输入集群名称")
|
||||
|
||||
_, err := this.RPC().NodeClusterRPC().CreateNodeCluster(this.AdminContext(), &pb.CreateNodeClusterRequest{
|
||||
Name: params.Name,
|
||||
GrantId: params.GrantId,
|
||||
InstallDir: params.InstallDir,
|
||||
})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
|
||||
this.Success()
|
||||
}
|
||||
23
internal/web/actions/default/clusters/helper.go
Normal file
23
internal/web/actions/default/clusters/helper.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package clusters
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
"github.com/iwind/TeaGo/actions"
|
||||
)
|
||||
|
||||
type Helper struct {
|
||||
}
|
||||
|
||||
func NewHelper() *Helper {
|
||||
return &Helper{}
|
||||
}
|
||||
|
||||
func (this *Helper) BeforeAction(action *actions.ActionObject) {
|
||||
action.Data["teaMenu"] = "clusters"
|
||||
|
||||
selectedTabbar, _ := action.Data["mainTab"]
|
||||
|
||||
tabbar := actionutils.NewTabbar()
|
||||
tabbar.Add("集群", "", "/clusters", "", selectedTabbar == "cluster")
|
||||
actionutils.SetTabbar(action, tabbar)
|
||||
}
|
||||
57
internal/web/actions/default/clusters/index.go
Normal file
57
internal/web/actions/default/clusters/index.go
Normal file
@@ -0,0 +1,57 @@
|
||||
package clusters
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/rpc/pb"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
"github.com/iwind/TeaGo/maps"
|
||||
)
|
||||
|
||||
type IndexAction struct {
|
||||
actionutils.ParentAction
|
||||
}
|
||||
|
||||
func (this *IndexAction) Init() {
|
||||
this.Nav("", "cluster", "index")
|
||||
}
|
||||
|
||||
func (this *IndexAction) RunGet(params struct{}) {
|
||||
countResp, err := this.RPC().NodeClusterRPC().CountAllEnabledNodeClusters(this.AdminContext(), &pb.CountAllEnabledNodeClustersRequest{})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
count := countResp.Count
|
||||
page := this.NewPage(count)
|
||||
this.Data["page"] = page.AsHTML()
|
||||
|
||||
clusterMaps := []maps.Map{}
|
||||
if count > 0 {
|
||||
clustersResp, err := this.RPC().NodeClusterRPC().ListEnabledNodeClusters(this.AdminContext(), &pb.ListEnabledNodeClustersRequest{
|
||||
Offset: page.Offset,
|
||||
Size: page.Size,
|
||||
})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
for _, cluster := range clustersResp.Clusters {
|
||||
// 节点数量
|
||||
countNodesResp, err := this.RPC().NodeRPC().CountAllEnabledNodesMatch(this.AdminContext(), &pb.CountAllEnabledNodesMatchRequest{ClusterId: cluster.Id})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
|
||||
clusterMaps = append(clusterMaps, maps.Map{
|
||||
"id": cluster.Id,
|
||||
"name": cluster.Name,
|
||||
"installDir": cluster.InstallDir,
|
||||
"hasGrant": cluster.GrantId > 0,
|
||||
"countNodes": countNodesResp.Count,
|
||||
})
|
||||
}
|
||||
}
|
||||
this.Data["clusters"] = clusterMaps
|
||||
|
||||
this.Show()
|
||||
}
|
||||
18
internal/web/actions/default/clusters/init.go
Normal file
18
internal/web/actions/default/clusters/init.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package clusters
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/helpers"
|
||||
"github.com/iwind/TeaGo"
|
||||
)
|
||||
|
||||
func init() {
|
||||
TeaGo.BeforeStart(func(server *TeaGo.Server) {
|
||||
server.
|
||||
Helper(helpers.NewUserMustAuth()).
|
||||
Helper(NewHelper()).
|
||||
Prefix("/clusters").
|
||||
Get("", new(IndexAction)).
|
||||
GetPost("/create", new(CreateAction)).
|
||||
EndAll()
|
||||
})
|
||||
}
|
||||
@@ -15,7 +15,7 @@ func (this *ChangedClustersAction) Init() {
|
||||
}
|
||||
|
||||
func (this *ChangedClustersAction) RunGet(params struct{}) {
|
||||
resp, err := this.RPC().NodeClusterRPC().FindAllChangedClusters(this.AdminContext(), &pb.FindAllChangedClustersRequest{})
|
||||
resp, err := this.RPC().NodeClusterRPC().FindAllChangedNodeClusters(this.AdminContext(), &pb.FindAllChangedNodeClustersRequest{})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
|
||||
@@ -13,7 +13,7 @@ func (this *SyncClustersAction) RunPost(params struct{}) {
|
||||
// TODO 将来可以单独选择某一个集群进行单独的同步
|
||||
|
||||
// 所有有变化的集群
|
||||
clustersResp, err := this.RPC().NodeClusterRPC().FindAllChangedClusters(this.AdminContext(), &pb.FindAllChangedClustersRequest{})
|
||||
clustersResp, err := this.RPC().NodeClusterRPC().FindAllChangedNodeClusters(this.AdminContext(), &pb.FindAllChangedNodeClustersRequest{})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
|
||||
@@ -13,11 +13,7 @@ func init() {
|
||||
Helper(new(helpers.UserMustAuth)).
|
||||
Helper(new(Helper)).
|
||||
Prefix("/nodes").
|
||||
Get("", new(IndexAction)).
|
||||
GetPost("/create", new(CreateAction)).
|
||||
Post("/delete", new(DeleteAction)).
|
||||
GetPost("/update", new(UpdateAction)).
|
||||
Get("/node", new(NodeAction)).
|
||||
|
||||
// IP地址
|
||||
GetPost("/ipAddresses/createPopup", new(ipAddresses.CreatePopupAction)).
|
||||
|
||||
@@ -20,7 +20,7 @@ func (this *CreateAction) Init() {
|
||||
|
||||
func (this *CreateAction) RunGet(params struct{}) {
|
||||
// 所有集群
|
||||
resp, err := this.RPC().NodeClusterRPC().FindAllEnabledClusters(this.AdminContext(), &pb.FindAllEnabledNodeClustersRequest{})
|
||||
resp, err := this.RPC().NodeClusterRPC().FindAllEnabledNodeClusters(this.AdminContext(), &pb.FindAllEnabledNodeClustersRequest{})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ func (this *ServerHelper) createLeftMenu(action *actions.ActionObject) {
|
||||
// TABBAR
|
||||
selectedTabbar, _ := action.Data["mainTab"]
|
||||
tabbar := actionutils.NewTabbar()
|
||||
tabbar.Add("当前:"+serverConfig.Name, "", "/servers", "left long alternate arrow", false)
|
||||
tabbar.Add("当前服务:"+serverConfig.Name, "", "/servers", "left long alternate arrow", false)
|
||||
tabbar.Add("看板", "", "/servers/server/board?serverId="+serverIdString, "dashboard", selectedTabbar == "board")
|
||||
tabbar.Add("日志", "", "/servers/server/log?serverId="+serverIdString, "history", selectedTabbar == "log")
|
||||
tabbar.Add("统计", "", "/servers/server/stat?serverId="+serverIdString, "chart area", selectedTabbar == "stat")
|
||||
|
||||
@@ -67,13 +67,18 @@ func (this *UserMustAuth) BeforeAction(actionPtr actions.ActionWrapper, paramNam
|
||||
modules := []map[string]interface{}{
|
||||
{
|
||||
"code": "servers",
|
||||
"menuName": "服务管理",
|
||||
"menuName": "代理服务",
|
||||
"icon": "clone outsize",
|
||||
},
|
||||
{
|
||||
"code": "nodes",
|
||||
"menuName": "节点管理",
|
||||
"icon": "server",
|
||||
"code": "clusters",
|
||||
"menuName": "节点集群",
|
||||
"icon": "cloud",
|
||||
},
|
||||
{
|
||||
"code": "api",
|
||||
"menuName": "API节点",
|
||||
"icon": "exchange",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
package web
|
||||
|
||||
import (
|
||||
_ "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/api"
|
||||
_ "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/api/node"
|
||||
_ "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters"
|
||||
_ "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/cluster"
|
||||
_ "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/cluster/settings"
|
||||
_ "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/common"
|
||||
_ "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/dashboard"
|
||||
_ "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/index"
|
||||
|
||||
Reference in New Issue
Block a user