添加节点分布式
This commit is contained in:
@@ -3,6 +3,7 @@ package svc
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"fusenapi/fsm"
|
||||
"fusenapi/server/product/internal/config"
|
||||
"net/http"
|
||||
|
||||
@@ -14,14 +15,14 @@ import (
|
||||
)
|
||||
|
||||
type ServiceContext struct {
|
||||
Config config.Config
|
||||
Config config.Config
|
||||
SharedState *fsm.StateCluster
|
||||
|
||||
MysqlConn *gorm.DB
|
||||
AllModels *gmodel.AllModelsGen
|
||||
}
|
||||
|
||||
func NewServiceContext(c config.Config) *ServiceContext {
|
||||
|
||||
return &ServiceContext{
|
||||
Config: c,
|
||||
MysqlConn: initalize.InitMysql(c.SourceMysql),
|
||||
|
||||
Reference in New Issue
Block a user