modify: 更新目录结构
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
# ====== 插件注册信息(控制加载方式) ======
|
||||
[workers]
|
||||
type = "aibox_sophon_adapter"
|
||||
module = "plugins.aibox_sophon_adapter"
|
||||
factory = "create_workers"
|
||||
cleanup = "cleanup"
|
||||
count = 1
|
||||
|
||||
[worker]
|
||||
name = "aibox_sophon_adapter"
|
||||
version = "0.1.0"
|
||||
@@ -9,18 +17,21 @@ defaults = { method = "GET", timeout = 30, auth_required = false, cacheable = fa
|
||||
router_prefix = "/aibox_sophon_adapter"
|
||||
tags = ["aibox_sophon_adapter", "sophon", "adapter"]
|
||||
|
||||
# 心跳超时配置(秒),超过此时间未收到心跳视为离线
|
||||
[worker.heartbeat]
|
||||
# ====== Worker 运行时配置(由 lifespan_setup 传递给 create_workers) ======
|
||||
[workers.config]
|
||||
data_dir = "./data"
|
||||
mediamtx_addr = "rtsp://127.0.0.1:8554" # MediaMTX 地址
|
||||
link_path = "/data/bm-app" # 软链接路径
|
||||
|
||||
[workers.config.heartbeat]
|
||||
interval = 5 # 设备上报间隔(秒)
|
||||
timeout = 15 # 超时阈值(秒),超过此时间未收到心跳视为离线
|
||||
check_interval = 10 # 服务端检查离线设备的间隔(秒)
|
||||
|
||||
# 外部 MQTT 转发配置 — 将心跳数据转发到指定的外部 MQTT Broker
|
||||
[worker.mqtt_forward]
|
||||
[workers.config.mqtt_forward]
|
||||
enabled = true
|
||||
uri = "mqtt://admin:Mixc%402021@dg.datagoo.cn:48081" # %40 是 @ 的 URL 编码
|
||||
topic = "/board_ping" # 转发目标主题
|
||||
|
||||
# 告警记录保留策略 — 超过 max_records 条时自动清理最早的记录(含关联视频文件)
|
||||
[worker.alarm_retention]
|
||||
[workers.config.alarm_retention]
|
||||
max_records = 100 # 最多保留的告警记录数,设为 0 表示不限制
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
# ====== 插件注册信息(控制加载方式) ======
|
||||
[workers]
|
||||
type = "auth"
|
||||
module = "plugins.auth"
|
||||
factory = "create_workers"
|
||||
cleanup = "cleanup"
|
||||
count = 3
|
||||
|
||||
[worker]
|
||||
name = "auth"
|
||||
version = "0.1.0"
|
||||
@@ -8,3 +16,6 @@ defaults = { method = "GET", ttl = 30, timeout = 2.0, auth_required = true, cach
|
||||
[worker.registration]
|
||||
router_prefix = "/auth"
|
||||
tags = ["auth"]
|
||||
|
||||
# ====== Worker 运行时配置(由 lifespan_setup 传递给 create_workers) ======
|
||||
[workers.config]
|
||||
+13
-50
@@ -1,50 +1,13 @@
|
||||
[[workers]]
|
||||
type = "example"
|
||||
module = "plugins.example"
|
||||
factory = "create_workers"
|
||||
cleanup = "cleanup"
|
||||
count = 3
|
||||
|
||||
[workers.config]
|
||||
type = "example"
|
||||
data_dir = "./data"
|
||||
|
||||
[[workers]]
|
||||
type = "doubao"
|
||||
module = "plugins.doubao"
|
||||
factory = "create_workers"
|
||||
cleanup = "cleanup"
|
||||
count = 3
|
||||
|
||||
[workers.config]
|
||||
type = "doubao"
|
||||
# is_aicc = true # 是否启用 AICC 安全通信模式(端云互信)
|
||||
api_key = "ark-b149df84-a057-4ca0-b1a0-82a22c4e3c70-33cde"
|
||||
base_url = "https://ark.cn-beijing.volces.com/api/v3"
|
||||
model = "doubao-seed-evolving"
|
||||
|
||||
# AICC 模式下 base_url 使用 APIGateway 地址,如:
|
||||
# api_key = "db04d42e-71e3-4119-abee-12ecc7ef5c34"
|
||||
# base_url = "https://sd77a0f4ummt3i4vnems0.apigateway-cn-beijing.volceapi.com/api/v3"
|
||||
# model = "ep-20260721154333-fre3bey"
|
||||
|
||||
[[workers]]
|
||||
type = "auth"
|
||||
module = "plugins.auth"
|
||||
factory = "create_workers"
|
||||
cleanup = "cleanup"
|
||||
count = 3
|
||||
|
||||
[workers.config]
|
||||
type = "auth"
|
||||
|
||||
[[workers]]
|
||||
type = "aibox_sophon_adapter"
|
||||
module = "plugins.aibox_sophon_adapter"
|
||||
factory = "create_workers"
|
||||
cleanup = "cleanup"
|
||||
count = 1
|
||||
|
||||
[workers.config]
|
||||
type = "aibox_sophon_adapter"
|
||||
data_dir = "./data"
|
||||
# 插件注册配置文件(旧版兼容)
|
||||
#
|
||||
# 新架构:框架自动扫描 config/workers/*/config.toml,
|
||||
# 从各插件的 [workers] 节读取注册信息。
|
||||
# 此文件仅作为旧版兼容保留,可留空或删除。
|
||||
#
|
||||
# 若需在此文件中显式声明插件(兼容旧行为),格式如下:
|
||||
# [[workers]]
|
||||
# type = "example"
|
||||
# module = "plugins.example"
|
||||
# factory = "create_workers"
|
||||
# cleanup = "cleanup"
|
||||
# count = 3
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
# ====== 插件注册信息(控制加载方式) ======
|
||||
[workers]
|
||||
type = "doubao"
|
||||
module = "plugins.doubao"
|
||||
factory = "create_workers"
|
||||
cleanup = "cleanup"
|
||||
count = 3
|
||||
|
||||
[worker]
|
||||
name = "doubao"
|
||||
version = "0.1.0"
|
||||
@@ -11,3 +19,20 @@ tags = ["vision", "ai"]
|
||||
|
||||
# is_aicc = true 时启用 AICC 安全通信(端云互信),使用 AsyncOpenAI + AsyncSecureHttpClient
|
||||
# is_aicc = false 时使用标准 Ark SDK(AsyncArk),默认 false
|
||||
|
||||
# ====== Worker 运行时配置(由 lifespan_setup 传递给 create_workers) ======
|
||||
[workers.config]
|
||||
api_key = "ark-b149df84-a057-4ca0-b1a0-82a22c4e3c70-33cde"
|
||||
base_url = "https://ark.cn-beijing.volces.com/api/v3"
|
||||
model = "doubao-seed-evolving"
|
||||
|
||||
# AICC 模式专用配置(按需启用):
|
||||
# is_aicc = true
|
||||
# api_key = "db04d42e-71e3-4119-abee-12ecc7ef5c34"
|
||||
# base_url = "https://sd77a0f4ummt3i4vnems0.apigateway-cn-beijing.volceapi.com/api/v3"
|
||||
# model = "ep-20260721154333-fre3bey"
|
||||
# ra_url = "" # 远程证明地址(独立于 base_url 时配置)
|
||||
# ra_service_name = "AICC.ConfidentialInference"
|
||||
# ra_policy_id = "router_policy"
|
||||
# ak = "" # 火山引擎 AK(TOP 网关鉴权模式)
|
||||
# sk = "" # 火山引擎 SK(TOP 网关鉴权模式)
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
# ====== 插件注册信息(控制加载方式) ======
|
||||
[workers]
|
||||
type = "example"
|
||||
module = "plugins.example"
|
||||
factory = "create_workers"
|
||||
cleanup = "cleanup"
|
||||
count = 3
|
||||
|
||||
[worker]
|
||||
name = "example"
|
||||
version = "0.1.0"
|
||||
@@ -8,3 +16,7 @@ defaults = { method = "GET", ttl = 30, timeout = 2.0, auth_required = true, cach
|
||||
[worker.registration]
|
||||
router_prefix = "/calc"
|
||||
tags = ["example"]
|
||||
|
||||
# ====== Worker 运行时配置(由 lifespan_setup 传递给 create_workers) ======
|
||||
[workers.config]
|
||||
data_dir = "./data"
|
||||
|
||||
Reference in New Issue
Block a user