mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2026-01-06 07:25:48 +08:00
集群增加是否远程启动选项
This commit is contained in:
@@ -197,7 +197,7 @@ func (this *NodeClusterDAO) CreateCluster(tx *dbs.Tx, adminId int64, name string
|
||||
}
|
||||
|
||||
// UpdateCluster 修改集群
|
||||
func (this *NodeClusterDAO) UpdateCluster(tx *dbs.Tx, clusterId int64, name string, grantId int64, installDir string, timezone string, nodeMaxThreads int32, autoOpenPorts bool, clockConfig *nodeconfigs.ClockConfig) error {
|
||||
func (this *NodeClusterDAO) UpdateCluster(tx *dbs.Tx, clusterId int64, name string, grantId int64, installDir string, timezone string, nodeMaxThreads int32, autoOpenPorts bool, clockConfig *nodeconfigs.ClockConfig, autoRemoteStart bool) error {
|
||||
if clusterId <= 0 {
|
||||
return errors.New("invalid clusterId")
|
||||
}
|
||||
@@ -222,6 +222,8 @@ func (this *NodeClusterDAO) UpdateCluster(tx *dbs.Tx, clusterId int64, name stri
|
||||
op.Clock = clockJSON
|
||||
}
|
||||
|
||||
op.AutoRemoteStart = autoRemoteStart
|
||||
|
||||
err := this.Save(tx, op)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
@@ -37,6 +37,7 @@ type NodeCluster struct {
|
||||
Uam dbs.JSON `field:"uam"` // UAM设置
|
||||
Clock dbs.JSON `field:"clock"` // 时钟配置
|
||||
GlobalServerConfig dbs.JSON `field:"globalServerConfig"` // 全局服务配置
|
||||
AutoRemoteStart bool `field:"autoRemoteStart"` // 自动远程启动
|
||||
}
|
||||
|
||||
type NodeClusterOperator struct {
|
||||
@@ -73,6 +74,7 @@ type NodeClusterOperator struct {
|
||||
Uam any // UAM设置
|
||||
Clock any // 时钟配置
|
||||
GlobalServerConfig any // 全局服务配置
|
||||
AutoRemoteStart any // 自动远程启动
|
||||
}
|
||||
|
||||
func NewNodeClusterOperator() *NodeClusterOperator {
|
||||
|
||||
@@ -4,35 +4,37 @@ import "github.com/iwind/TeaGo/dbs"
|
||||
|
||||
// NSCluster 域名服务器集群
|
||||
type NSCluster struct {
|
||||
Id uint32 `field:"id"` // ID
|
||||
IsOn bool `field:"isOn"` // 是否启用
|
||||
Name string `field:"name"` // 集群名
|
||||
InstallDir string `field:"installDir"` // 安装目录
|
||||
State uint8 `field:"state"` // 状态
|
||||
AccessLog dbs.JSON `field:"accessLog"` // 访问日志配置
|
||||
GrantId uint32 `field:"grantId"` // 授权ID
|
||||
Recursion dbs.JSON `field:"recursion"` // 递归DNS设置
|
||||
Tcp dbs.JSON `field:"tcp"` // TCP设置
|
||||
Tls dbs.JSON `field:"tls"` // TLS设置
|
||||
Udp dbs.JSON `field:"udp"` // UDP设置
|
||||
DdosProtection dbs.JSON `field:"ddosProtection"` // DDoS防护设置
|
||||
Hosts dbs.JSON `field:"hosts"` // DNS主机地址
|
||||
Id uint32 `field:"id"` // ID
|
||||
IsOn bool `field:"isOn"` // 是否启用
|
||||
Name string `field:"name"` // 集群名
|
||||
InstallDir string `field:"installDir"` // 安装目录
|
||||
State uint8 `field:"state"` // 状态
|
||||
AccessLog dbs.JSON `field:"accessLog"` // 访问日志配置
|
||||
GrantId uint32 `field:"grantId"` // 授权ID
|
||||
Recursion dbs.JSON `field:"recursion"` // 递归DNS设置
|
||||
Tcp dbs.JSON `field:"tcp"` // TCP设置
|
||||
Tls dbs.JSON `field:"tls"` // TLS设置
|
||||
Udp dbs.JSON `field:"udp"` // UDP设置
|
||||
DdosProtection dbs.JSON `field:"ddosProtection"` // DDoS防护设置
|
||||
Hosts dbs.JSON `field:"hosts"` // DNS主机地址
|
||||
AutoRemoteStart bool `field:"autoRemoteStart"` // 自动远程启动
|
||||
}
|
||||
|
||||
type NSClusterOperator struct {
|
||||
Id any // ID
|
||||
IsOn any // 是否启用
|
||||
Name any // 集群名
|
||||
InstallDir any // 安装目录
|
||||
State any // 状态
|
||||
AccessLog any // 访问日志配置
|
||||
GrantId any // 授权ID
|
||||
Recursion any // 递归DNS设置
|
||||
Tcp any // TCP设置
|
||||
Tls any // TLS设置
|
||||
Udp any // UDP设置
|
||||
DdosProtection any // DDoS防护设置
|
||||
Hosts any // DNS主机地址
|
||||
Id any // ID
|
||||
IsOn any // 是否启用
|
||||
Name any // 集群名
|
||||
InstallDir any // 安装目录
|
||||
State any // 状态
|
||||
AccessLog any // 访问日志配置
|
||||
GrantId any // 授权ID
|
||||
Recursion any // 递归DNS设置
|
||||
Tcp any // TCP设置
|
||||
Tls any // TLS设置
|
||||
Udp any // UDP设置
|
||||
DdosProtection any // DDoS防护设置
|
||||
Hosts any // DNS主机地址
|
||||
AutoRemoteStart any // 自动远程启动
|
||||
}
|
||||
|
||||
func NewNSClusterOperator() *NSClusterOperator {
|
||||
|
||||
Reference in New Issue
Block a user