Layer or a ManagedRuntime.
Simple path: provide a layer
Useeos.provide(AppLive) when per-call acquisition is acceptable and you do not need to own runtime shutdown. You can also pass the layer directly with makeEffectORPC(AppLive).
layer.ts
Long-lived resources: own the runtime
UsemakeEffectORPC(runtime) when scoped resources should be acquired once and released on application shutdown.
runtime.ts
- database pools
- telemetry SDKs
- HTTP clients with connection pools
- caches
- long-lived scoped resources
Wrap an existing oRPC builder
If your application already has an oRPC builder, wrap it:wrap-builder.ts