mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-12 23:00:25 +08:00
DNS节点可以自动升级
This commit is contained in:
@@ -65,7 +65,7 @@ func (this *DeployManager) FindNodeFile(os string, arch string) *DeployFile {
|
||||
return nil
|
||||
}
|
||||
|
||||
// LoadNSNodeFiles 加载所有文件
|
||||
// LoadNSNodeFiles 加载所有NS节点安装文件
|
||||
func (this *DeployManager) LoadNSNodeFiles() []*DeployFile {
|
||||
keyMap := map[string]*DeployFile{} // key => File
|
||||
|
||||
@@ -99,3 +99,13 @@ func (this *DeployManager) LoadNSNodeFiles() []*DeployFile {
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
// FindNSNodeFile 查找特别平台的NS节点安装文件
|
||||
func (this *DeployManager) FindNSNodeFile(os string, arch string) *DeployFile {
|
||||
for _, file := range this.LoadNSNodeFiles() {
|
||||
if file.OS == os && file.Arch == arch {
|
||||
return file
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user