修改为龙舟
This commit is contained in:
@@ -10,4 +10,5 @@ type Config struct {
|
||||
rest.RestConf
|
||||
SourceMysql string
|
||||
Auth types.Auth
|
||||
ReplicaId uint64
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user