Files
chongming-config/workers/example/config.toml
T

28 lines
927 B
TOML
Raw Normal View History

2026-08-03 16:56:10 +08:00
# ====== 插件注册信息(控制加载方式) ======
[workers]
type = "example"
module = "plugins.example"
factory = "create_workers"
cleanup = "cleanup"
2026-09-18 09:25:43 +08:00
count = 0
# 运行模式(按插件粒度,两种模式可同时存在):
# "inline"(默认)= 网关进程内加载
# "external" = 独立进程运行(Docker/K8s 编排: uv run worker_serve --type example),
# 经 Zenoh 注册路由,网关动态挂载
load_mode = "inline"
2026-08-03 16:56:10 +08:00
2026-07-22 17:15:16 +08:00
[worker]
name = "example"
version = "0.1.0"
description = "chongming worker example — demonstrates new config features"
config_version = "1.0"
2026-07-24 15:14:57 +08:00
defaults = { method = "GET", ttl = 30, timeout = 2.0, auth_required = true, cacheable = false, internal = false }
2026-07-22 17:15:16 +08:00
[worker.registration]
router_prefix = "/calc"
tags = ["example"]
2026-08-03 16:56:10 +08:00
# ====== Worker 运行时配置(由 lifespan_setup 传递给 create_workers) ======
[workers.config]
data_dir = "./data"