Skip to content

Commit

Permalink
容器初始化,将不再由模块控制
Browse files Browse the repository at this point in the history
  • Loading branch information
steden committed Jan 23, 2024
1 parent 4222c4d commit bf289ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion container/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

// Container 容器操作
var defContainer *container
var defContainer = NewContainer()

func InitContainer() {
defContainer = NewContainer()
Expand Down
7 changes: 2 additions & 5 deletions modules/farseerKernelModule.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ func (module FarseerKernelModule) PreInitialize() {
// 1、初始化配置
configure.InitConfig()

// 2、初始化容器
container.InitContainer()

// 3、初始化日志
// 2、初始化日志
log := flog.InitLog()

// 4、配置日志
Expand All @@ -35,7 +32,7 @@ func (module FarseerKernelModule) PreInitialize() {

// 初始化时间轮
timingWheel.NewDefault(100*time.Millisecond, 60)

// 注册空的链路实现
container.Register(func() trace.IManager { return &trace.EmptyManager{} })
}

0 comments on commit bf289ed

Please sign in to comment.