网站服务变更也能自动同步DNS

This commit is contained in:
刘祥超
2020-11-16 15:26:51 +08:00
parent b331cb71b0
commit 1c703dd013
3 changed files with 72 additions and 0 deletions

View File

@@ -862,6 +862,14 @@ func (this *ServerDAO) createEvent() error {
return SharedSysEventDAO.CreateEvent(NewServerChangeEvent())
}
// 查询当前服务的ClusterId
func (this *ServerDAO) FindServerClusterId(serverId int64) (int64, error) {
return this.Query().
Pk(serverId).
Result("clusterId").
FindInt64Col(0)
}
// 生成DNS Name
func (this *ServerDAO) genDNSName() (string, error) {
for {