No project description provided
Project description
patch_bay
特性
- 中央节点按配置在进程间转发字节流;拓扑由配置给出。
- PatchBay:中央交换;主动连接配置中的各 Jack,再按
wires转发(Jack 与 Jack 不直连)。 - Jack:业务侧接入点,在本机 被动监听 WebSocket;可多个 PatchBay 同时接入,
send向各交换机 广播 同一帧。不与其他 Jack 直连。 - 每条边可绑定表达式;按当前数据包求值决定是否允许经过。
- 支持任意数据结构;传输为字节,编码与解析由业务自行决定。
配置
jacks
数组;元素字段:
| 字段 | 说明 |
|---|---|
name |
名称(wires 里用名字引用,便于配置复用) |
address |
该机 Jack 的监听地址 host:port(PatchBay 向此地址发起 WebSocket),须在列表内唯一 |
业务侧 Jack(port[, host=…]) 默认 host=0.0.0.0;在本机 host:port 上挂默认路径 /ws。PatchBay 里该机的 address 须为对端可达的 IP:端口(本机互通时 listen_address 为 127.0.0.1:port 提示)。不必在代码里写 name。
wires
数组;元素常用键名 from、to。字段:
| 字段 | 说明 |
|---|---|
from |
源端 Jack 的 name |
to |
目标 Jack 的 name |
rule |
在 rules 中已定义的规则 id |
rules
| 项 | 说明 |
|---|---|
| 键 | 规则 id,供 wires 中 rule 引用 |
| 值 | 表达式字符串;求值时带入当前数据包相关变量(如原始字节、可解析出的 JSON 等) |
| 转发条件 | 仅表达式成立时沿该边发出;不成立或求值失败则不发出 |
listen
| 默认 | 说明 |
|---|---|
8765 |
配置项保留;当前 PatchBay 不再在本字段上接受 Jack 入站,可忽略。 |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python_library_patch_bay-0.1.8.tar.gz.
File metadata
- Download URL: python_library_patch_bay-0.1.8.tar.gz
- Upload date:
- Size: 20.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4eb0d8f2f73863771de4b286c6f1b77ce559a928d91f971e32c8850ebd628de
|
|
| MD5 |
fa332739276a07f2f2cf784f002af468
|
|
| BLAKE2b-256 |
533a00b0cb5906629bf09b5e720b985b75238f7dc714693469772ecb1d02fccb
|
File details
Details for the file python_library_patch_bay-0.1.8-py3-none-any.whl.
File metadata
- Download URL: python_library_patch_bay-0.1.8-py3-none-any.whl
- Upload date:
- Size: 28.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2f970d36f22b5d11c271ebe3e15da340a466b3100cb27f1c5a4ab4491b8ab1f
|
|
| MD5 |
e00871d328df15cb5b09586007039a3f
|
|
| BLAKE2b-256 |
3de81a44fcef194905236d614dd591faa6db644b0a892577c9602777403fc603
|