nats连接与执行方法分离

This commit is contained in:
2026-01-13 14:15:45 +08:00
parent 4d6aa1f384
commit 86cb177625
4 changed files with 329 additions and 317 deletions

View File

@@ -131,7 +131,7 @@ func TestNatsPublishRequest(t *testing.T) {
}
// RPC 请求
response, err := Request(ctx, "test.request", []byte("request"), 5*time.Second)
response, err := CallRPC(ctx, "test.request", []byte("request"), 5*time.Second)
if err != nil {
t.Logf("RPC 请求失败: %v", err)
} else {