refactor(*): 平台架构 - 拆分后端领域模块并同步插件协议与模型能力
This commit is contained in:
1 parent
916043fb5a
commit
6e5cbc8b05
644 files changed
+62731
-2320
No files matched your search
@@ -0,0 +1,24 @@
|
||||
package generation
|
||||
|
||||
import (
|
||||
"infinite-canvas/backend/internal/protocol"
|
||||
)
|
||||
|
||||
// Engine 是 generation 域的入口;由 service 组合根构造并注入 Deps。
|
||||
type Engine struct {
|
||||
deps Deps
|
||||
}
|
||||
|
||||
func NewEngine(deps Deps) *Engine {
|
||||
return &Engine{deps: deps}
|
||||
}
|
||||
|
||||
func (e *Engine) ProtocolRegistry() *protocol.Registry {
|
||||
if e == nil {
|
||||
return nil
|
||||
}
|
||||
if e.deps.Registry != nil {
|
||||
return e.deps.Registry
|
||||
}
|
||||
return loadOfficialFallbackRegistry()
|
||||
}
|
||||
Reference in new issue
Block a user