From 06d088e33386c80d825a95b2e50e9017455bd8aa Mon Sep 17 00:00:00 2001 From: zimujun20 <1192147078@qq.com> Date: Tue, 4 Oct 2022 13:31:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E8=8E=B7=E5=8F=96=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E5=9C=B0=E5=9D=80=E5=92=8C=E8=B4=9F=E8=BD=BD=E5=9D=87?= =?UTF-8?q?=E8=A1=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/webserver/pkg/api/pc/load_alancing.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/webserver/pkg/api/pc/load_alancing.go b/src/webserver/pkg/api/pc/load_alancing.go index e69b370..2684236 100644 --- a/src/webserver/pkg/api/pc/load_alancing.go +++ b/src/webserver/pkg/api/pc/load_alancing.go @@ -6,6 +6,7 @@ import ( "time" "math/rand" "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() for i := 0; i < 3; i++ { shuffle(ipAddress) } - return ipAddress + appG.Response(http.StatusOK, "成功", null) } \ No newline at end of file