节点自动升级功能之前的版本
This commit is contained in:
@@ -34,7 +34,7 @@ func init() {
|
||||
})
|
||||
}
|
||||
|
||||
func (this *HTTPDNSClusterDAO) CreateCluster(tx *dbs.Tx, name string, serviceDomain string, defaultTTL int32, fallbackTimeoutMs int32, installDir string, tlsPolicyJSON []byte, isOn bool, isDefault bool) (int64, error) {
|
||||
func (this *HTTPDNSClusterDAO) CreateCluster(tx *dbs.Tx, name string, serviceDomain string, defaultTTL int32, fallbackTimeoutMs int32, installDir string, tlsPolicyJSON []byte, isOn bool, isDefault bool, autoRemoteStart bool, accessLogIsOn bool) (int64, error) {
|
||||
if isDefault {
|
||||
err := this.Query(tx).
|
||||
State(HTTPDNSClusterStateEnabled).
|
||||
@@ -53,6 +53,8 @@ func (this *HTTPDNSClusterDAO) CreateCluster(tx *dbs.Tx, name string, serviceDom
|
||||
op.InstallDir = installDir
|
||||
op.IsOn = isOn
|
||||
op.IsDefault = isDefault
|
||||
op.AutoRemoteStart = autoRemoteStart
|
||||
op.AccessLogIsOn = accessLogIsOn
|
||||
op.CreatedAt = time.Now().Unix()
|
||||
op.UpdatedAt = time.Now().Unix()
|
||||
op.State = HTTPDNSClusterStateEnabled
|
||||
@@ -66,7 +68,7 @@ func (this *HTTPDNSClusterDAO) CreateCluster(tx *dbs.Tx, name string, serviceDom
|
||||
return types.Int64(op.Id), nil
|
||||
}
|
||||
|
||||
func (this *HTTPDNSClusterDAO) UpdateCluster(tx *dbs.Tx, clusterId int64, name string, serviceDomain string, defaultTTL int32, fallbackTimeoutMs int32, installDir string, tlsPolicyJSON []byte, isOn bool, isDefault bool) error {
|
||||
func (this *HTTPDNSClusterDAO) UpdateCluster(tx *dbs.Tx, clusterId int64, name string, serviceDomain string, defaultTTL int32, fallbackTimeoutMs int32, installDir string, tlsPolicyJSON []byte, isOn bool, isDefault bool, autoRemoteStart bool, accessLogIsOn bool) error {
|
||||
if isDefault {
|
||||
err := this.Query(tx).
|
||||
State(HTTPDNSClusterStateEnabled).
|
||||
@@ -87,6 +89,8 @@ func (this *HTTPDNSClusterDAO) UpdateCluster(tx *dbs.Tx, clusterId int64, name s
|
||||
op.InstallDir = installDir
|
||||
op.IsOn = isOn
|
||||
op.IsDefault = isDefault
|
||||
op.AutoRemoteStart = autoRemoteStart
|
||||
op.AccessLogIsOn = accessLogIsOn
|
||||
op.UpdatedAt = time.Now().Unix()
|
||||
if len(tlsPolicyJSON) > 0 {
|
||||
op.TLSPolicy = tlsPolicyJSON
|
||||
|
||||
Reference in New Issue
Block a user