|
|
@ -6,6 +6,7 @@ import (
|
|
|
|
"time"
|
|
|
|
"time"
|
|
|
|
"math/rand"
|
|
|
|
"math/rand"
|
|
|
|
"strings"
|
|
|
|
"strings"
|
|
|
|
|
|
|
|
"pkg/app"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
//拉取在线的算力设备
|
|
|
|
//拉取在线的算力设备
|
|
|
@ -53,10 +54,11 @@ func shuffle(n []string) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//返回可进行运算的设备地址
|
|
|
|
//返回可进行运算的设备地址
|
|
|
|
func request() []string {
|
|
|
|
func request(c *gin.Contex) []string {
|
|
|
|
|
|
|
|
appG := app.Gin{C: c}
|
|
|
|
var ipAddress = ipAddress()
|
|
|
|
var ipAddress = ipAddress()
|
|
|
|
for i := 0; i < 3; i++ {
|
|
|
|
for i := 0; i < 3; i++ {
|
|
|
|
shuffle(ipAddress)
|
|
|
|
shuffle(ipAddress)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return ipAddress
|
|
|
|
appG.Response(http.StatusOK, "成功", null)
|
|
|
|
}
|
|
|
|
}
|