From a3b8dd032331660af7256eef360f075b45d6222d Mon Sep 17 00:00:00 2001 From: chakcy <947105045@qq.com> Date: Tue, 21 Jul 2026 16:14:59 +0800 Subject: [PATCH] =?UTF-8?q?add=20README.md=20=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/README.md b/README.md index e69de29..1b9fe24 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,25 @@ +# chongming-request + +Worker 直连客户端,用于从服务端调用 Zenoh Worker 的 RPC 方法。 + +## 功能 + +- 自动发现存活 Worker(基于 Zenoh liveliness) +- 随机负载均衡 +- 超时重试 +- 支持同步/异步调用 + +## 使用 + +```python +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", ...} +```