mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-05-24 00:45:57 +00:00
refactor(gateway): restructure gateway with new dependency injection and services
Reorganize app/gateway/ with: - common/ - lifespan management - dependencies/ - FastAPI dependency injection (db, checkpointer, repositories, stream_bridge) - services/runs/ - run execution services (facade_factory, input adapters, store operations) - registrar.py - router registration - router.py - main router setup Simplify app.py to use the new modular structure. Remove deprecated utils.py. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,23 @@
|
||||
from .app import app, create_app
|
||||
from .config import GatewayConfig, get_gateway_config
|
||||
from __future__ import annotations
|
||||
|
||||
__all__ = ["app", "create_app", "GatewayConfig", "get_gateway_config"]
|
||||
__all__ = ["GatewayConfig", "app", "get_gateway_config", "register_app"]
|
||||
|
||||
|
||||
def __getattr__(name: str):
|
||||
if name == "app":
|
||||
from .app import app
|
||||
|
||||
return app
|
||||
if name == "GatewayConfig":
|
||||
from .config import GatewayConfig
|
||||
|
||||
return GatewayConfig
|
||||
if name == "get_gateway_config":
|
||||
from .config import get_gateway_config
|
||||
|
||||
return get_gateway_config
|
||||
if name == "register_app":
|
||||
from .registrar import register_app
|
||||
|
||||
return register_app
|
||||
raise AttributeError(name)
|
||||
|
||||
Reference in New Issue
Block a user