mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-02-04 16:52:26 +08:00
添加了节点服务器,各个服务器之间支持多对多
This commit is contained in:
@@ -5,19 +5,19 @@ import (
|
||||
"strconv"
|
||||
|
||||
"hk4e/common/config"
|
||||
"hk4e/gm/rpc_client"
|
||||
"hk4e/common/rpc"
|
||||
"hk4e/pkg/logger"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
type Controller struct {
|
||||
rpc *rpc_client.Client
|
||||
gm *rpc.GMClient
|
||||
}
|
||||
|
||||
func NewController(rpc *rpc_client.Client) (r *Controller) {
|
||||
func NewController(gm *rpc.GMClient) (r *Controller) {
|
||||
r = new(Controller)
|
||||
r.rpc = rpc
|
||||
r.gm = gm
|
||||
go r.registerRouter()
|
||||
return r
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user