mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-11-14 04:40:54 +08:00
节点SSH登录自动使用集群设置
This commit is contained in:
7638
build/rpc.json
7638
build/rpc.json
File diff suppressed because it is too large
Load Diff
11
pkg/nodeconfigs/ssh_params.go
Normal file
11
pkg/nodeconfigs/ssh_params.go
Normal file
@@ -0,0 +1,11 @@
|
||||
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
|
||||
|
||||
package nodeconfigs
|
||||
|
||||
func DefaultSSHParams() *SSHParams {
|
||||
return &SSHParams{Port: 22}
|
||||
}
|
||||
|
||||
type SSHParams struct {
|
||||
Port int `json:"port"`
|
||||
}
|
||||
@@ -49,6 +49,7 @@ type NodeCluster struct {
|
||||
ClockJSON []byte `protobuf:"bytes,18,opt,name=clockJSON,proto3" json:"clockJSON,omitempty"`
|
||||
AutoRemoteStart bool `protobuf:"varint,19,opt,name=autoRemoteStart,proto3" json:"autoRemoteStart,omitempty"`
|
||||
AutoInstallNftables bool `protobuf:"varint,20,opt,name=autoInstallNftables,proto3" json:"autoInstallNftables,omitempty"`
|
||||
SshParamsJSON []byte `protobuf:"bytes,21,opt,name=sshParamsJSON,proto3" json:"sshParamsJSON,omitempty"`
|
||||
}
|
||||
|
||||
func (x *NodeCluster) Reset() {
|
||||
@@ -216,12 +217,19 @@ func (x *NodeCluster) GetAutoInstallNftables() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *NodeCluster) GetSshParamsJSON() []byte {
|
||||
if x != nil {
|
||||
return x.SshParamsJSON
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_models_model_node_cluster_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_node_cluster_proto_rawDesc = []byte{
|
||||
0x0a, 0x1f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 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, 0xf7, 0x04, 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c,
|
||||
0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x9d, 0x05, 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,
|
||||
@@ -260,8 +268,11 @@ var file_models_model_node_cluster_proto_rawDesc = []byte{
|
||||
0x74, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x30, 0x0a,
|
||||
0x13, 0x61, 0x75, 0x74, 0x6f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x4e, 0x66, 0x74, 0x61,
|
||||
0x62, 0x6c, 0x65, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x61, 0x75, 0x74, 0x6f,
|
||||
0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x4e, 0x66, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x42,
|
||||
0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x4e, 0x66, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12,
|
||||
0x24, 0x0a, 0x0d, 0x73, 0x73, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x4a, 0x53, 0x4f, 0x4e,
|
||||
0x18, 0x15, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x73, 0x73, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d,
|
||||
0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -23,4 +23,5 @@ message NodeCluster {
|
||||
bytes clockJSON = 18;
|
||||
bool autoRemoteStart = 19;
|
||||
bool autoInstallNftables = 20;
|
||||
bytes sshParamsJSON = 21;
|
||||
}
|
||||
@@ -182,6 +182,7 @@ message UpdateNodeClusterRequest {
|
||||
bytes clockJSON = 9;
|
||||
bool autoRemoteStart = 10;
|
||||
bool autoInstallNftables = 11;
|
||||
bytes sshParamsJSON = 12;
|
||||
}
|
||||
|
||||
// 删除集群
|
||||
|
||||
Reference in New Issue
Block a user