2026-07-21 16:14:59 +08:00
2026-07-21 15:47:02 +08:00
2026-07-21 15:47:02 +08:00
2026-07-21 15:47:02 +08:00
2026-07-21 16:14:59 +08:00

chongming-request

Worker 直连客户端,用于从服务端调用 Zenoh Worker 的 RPC 方法。

功能

  • 自动发现存活 Worker(基于 Zenoh liveliness)
  • 随机负载均衡
  • 超时重试
  • 支持同步/异步调用

使用

from chongming_request import Client

async with Client(session=zenoh_session) as client:
    result = await client.call(
        worker_type="example",
        subject="example.add",
        payload={"a": 1, "b": 2},
        method="GET"
    )
    print(result)  # {"result": 3, "operation": "add", ...}
S
Description
No description provided
Readme
115 KiB
Languages
Python 100%