修改为龙舟
This commit is contained in:
@@ -10,6 +10,7 @@ type Config struct {
|
||||
rest.RestConf
|
||||
SourceMysql string
|
||||
Auth types.Auth
|
||||
ReplicaId uint64
|
||||
|
||||
MainAddress string
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
|
||||
type ServiceContext struct {
|
||||
Config config.Config
|
||||
SharedState *fsm.FsStateMachine
|
||||
SharedState *fsm.SharedState
|
||||
|
||||
MysqlConn *gorm.DB
|
||||
AllModels *gmodel.AllModelsGen
|
||||
@@ -28,7 +28,7 @@ type ServiceContext struct {
|
||||
|
||||
func NewServiceContext(c config.Config) *ServiceContext {
|
||||
conn := initalize.InitMysql(c.SourceMysql)
|
||||
StateServer := fsm.StartNode(c.Name, fmt.Sprintf("localhost:%d", c.Port-2000), autoconfig.AutoGetAllServerConfig(), conn)
|
||||
StateServer := fsm.StartNode(c.ReplicaId, autoconfig.AutoGetAllServerConfig(), conn)
|
||||
|
||||
return &ServiceContext{
|
||||
Config: c,
|
||||
|
||||
Reference in New Issue
Block a user