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

26 lines
918 B
TOML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ====== 插件注册信息(进程插件示例:独立进程运行) ======
[workers]
type = "demo"
module = "workers.demo"
factory = "create_workers"
cleanup = "cleanup"
count = 2
# 进程插件:由 Docker/K8s 编排拉起独立进程(容器入口 uv run worker_serve --type demo),
# 经 Zenoh 注册路由,网关动态挂载;与 src/plugins/ 下的 inline 插件可同时存在
load_mode = "external"
[worker]
name = "demo"
version = "0.1.0"
description = "进程插件示例 — 独立进程运行,经 Zenoh 注册路由"
config_version = "1.0"
defaults = { method = "GET", timeout = 30.0, auth_required = false, cacheable = false, internal = false }
[worker.registration]
router_prefix = "/demo"
tags = ["demo", "process-plugin"]
# ====== Worker 运行时配置(由 worker_serve 传递给 create_workers) ======
[workers.config]
greeting_prefix = "Hello" # 演示插件私有配置项