Route all ingress calls/sends through a named scope. The in-handler scope(scopeKey) and this scope(ingress, scopeKey) produce the same .client(def) / .sendClient(def) shape, so handler and ingress code read identically (modulo the explicit ingress).
scope(scopeKey)
scope(ingress, scopeKey)
.client(def)
.sendClient(def)
ingress
await clients.scope(ingress, "tenant-123").client(Greeter).greet(name); await clients.scope(ingress, "tenant-123").client(Cart, "cart-42").add(item); Copy
await clients.scope(ingress, "tenant-123").client(Greeter).greet(name); await clients.scope(ingress, "tenant-123").client(Cart, "cart-42").add(item);
Route all ingress calls/sends through a named scope. The in-handler
scope(scopeKey)and thisscope(ingress, scopeKey)produce the same.client(def)/.sendClient(def)shape, so handler and ingress code read identically (modulo the explicitingress).