修改为龙舟

This commit is contained in:
2023-07-31 00:41:04 +08:00
parent 7fd48edef8
commit fe51e85983
39 changed files with 81 additions and 133 deletions

View File

@@ -2,6 +2,7 @@ package config
import (
"fusenapi/server/map-library/internal/types"
"github.com/zeromicro/go-zero/rest"
)
@@ -9,4 +10,5 @@ type Config struct {
rest.RestConf
SourceMysql string
Auth types.Auth
ReplicaId uint64
}

View File

@@ -17,7 +17,7 @@ import (
type ServiceContext struct {
Config config.Config
SharedState *fsm.FsStateMachine
SharedState *fsm.SharedState
MysqlConn *gorm.DB
AllModels *gmodel.AllModelsGen
@@ -25,7 +25,7 @@ type ServiceContext struct {
func NewServiceContext(c config.Config) *ServiceContext {
conn := initalize.InitMysql(c.SourceMysql)
StateServer := fsm.StartNode(c.Name, fmt.Sprintf("%s:%d", c.Host, c.Port-2000), autoconfig.AutoGetAllServerConfig(), conn)
StateServer := fsm.StartNode(c.ReplicaId, autoconfig.AutoGetAllServerConfig(), conn)
return &ServiceContext{
Config: c,