|
|
@ -44,16 +44,16 @@ func NewEngine(conf config.EngineConf, opts ...RunOption) *Engine {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
for _, opt := range opts {
|
|
|
|
|
|
|
|
opt(ngin)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ngin.pool == nil {
|
|
|
|
if ngin.pool == nil {
|
|
|
|
ngin.pool, _ = ants.NewPool(math.MaxInt32)
|
|
|
|
ngin.pool, _ = ants.NewPool(math.MaxInt32)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ngin.evtMgr = event.NewEventManager(ngin.pool)
|
|
|
|
ngin.evtMgr = event.NewEventManager(ngin.pool)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for _, opt := range opts {
|
|
|
|
|
|
|
|
opt(ngin)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return ngin
|
|
|
|
return ngin
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|