- 36 files: module structure following module-development-spec - 7 table definitions: users_cache, pricing_cache, llmage_cache, uapi_cache, sync_state, customer_balance, accounting_records - Auth: dapi_auth + uapi_sign - Sync: base_sync + entity-specific sync modules (users/pricing/uapi/llmage) - Cache: LRU cache manager with TTL - API: balance, accounting, users, pricing, health handlers - Config: YAML config loader with env overrides - Utils: HTTP client, crypto helpers
36 lines
576 B
YAML
36 lines
576 B
YAML
# SageAPI 运行配置
|
|
# 环境变量覆盖: SAGEAPI_<SECTION>_<KEY>
|
|
# 示例: SAGEAPI_DATABASE_HOST=10.0.0.1
|
|
|
|
server:
|
|
host: "0.0.0.0"
|
|
port: 8080
|
|
workers: 4
|
|
|
|
database:
|
|
host: "127.0.0.1"
|
|
port: 3306
|
|
dbname: "sageapi_db"
|
|
user: "root"
|
|
password: ""
|
|
pool_size: 10
|
|
|
|
upstream:
|
|
sage_base_url: "http://127.0.0.1:9180"
|
|
dapi_key: ""
|
|
dapi_secret: ""
|
|
timeout: 30
|
|
|
|
sync:
|
|
interval_seconds: 60
|
|
batch_size: 500
|
|
max_retries: 3
|
|
|
|
cache:
|
|
ttl_seconds: 300
|
|
max_entries: 10000
|
|
|
|
logging:
|
|
level: "INFO"
|
|
format: "%(asctime)s [%(levelname)s] %(name)s: %(message)s"
|