Files
chongming-config/workers/demo/config.toml
T
2026-08-21 15:29:59 +08:00

40 lines
1.7 KiB
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" # 演示插件私有配置项
# ====== 文件传输:直连 S3/Minio 对象存储(可选,默认不启用) ======
# 启用后 demo.storage.* 端点可用(预签名 URL 直传直取 + base64 小文件传输),
# 数据路径不经过网关,详见 docs/process-plugin.md「文件传输:直连 S3/Minio」。
# 取消下面 8 行注释并填好 Minio 地址/密钥即可启用;连接失败会告警降级(端点返回
# "storage 未配置" 错误),不会影响其他端点。
# [workers.config.storage]
# endpoint = "192.168.1.10:9000" # Minio 地址 host:port(不带协议前缀)
# access_key = "minioadmin"
# secret_key = "minioadmin"
# bucket = "chongming-files"
# secure = false # false=http(默认),true=https
# region = "" # 可选
# auto_create_bucket = true # 可选,默认 true:启动时确保 bucket 存在