系统架构层面流量控制功能完善

This commit is contained in:
flswld
2023-02-05 07:18:43 +08:00
parent cfb001c18a
commit 94c8db402a
51 changed files with 1049 additions and 2408 deletions

View File

@@ -5,6 +5,7 @@ import (
_ "net/http/pprof"
"os"
"os/signal"
"sync/atomic"
"syscall"
"time"
@@ -49,6 +50,7 @@ func Run(ctx context.Context, configFile string) error {
_, err := client.Discovery.KeepaliveServer(context.TODO(), &api.KeepaliveServerReq{
ServerType: api.GS,
AppId: APPID,
LoadCount: uint32(atomic.LoadInt32(&game.ONLINE_PLAYER_NUM)),
})
if err != nil {
logger.Error("keepalive error: %v", err)