rpc_dart_framework 0.3.3
rpc_dart_framework: ^0.3.3 copied to clipboard
Client and server framework for rpc_dart — modules, DI, lifecycle, graceful shutdown, rate limiting, isolate workers, and test harness.
0.3.3 #
Fixes (audit):
RpcApp._setupEndpointno longer swallows abuildContracts()failure. Previously a throwingbuildContractswas logged and ignored, thenendpoint.start()ran anyway, leaving a live endpoint missing its services (clients got "method not found" instead of a startup failure). The error is now logged with context and rethrown, sostart()aborts and the normal rollback runs;endpoint.start()is not reached.RpcApp.start()is now single-shot. Previously, after a failed start, callingstart()again re-entered and reassigned thelate finallifecycle fields (_modules,_container,_env,_autoInterceptors), throwingLateInitializationErrorand masking the original failure. A failed start now surfaces the ORIGINAL exception, and any laterstart()(after success or failure) throws a clearStateError("RpcApp.start() can only be called once; create a new RpcApp to restart."). Note: true restart of anRpcAppinstance was never supported (the lifecycle fields arelate final); create a new instance to restart.
0.3.2 #
- Fixed
RpcAppConfig.logControllernot being wired to endpoints --context.lognow works in responder handlers whenlogControlleris set in config.
Fixes (audit):
RpcApp.start()now rolls back on a partial startup failure: already-started modules getonStop(), the transport server is stopped, and spawned isolates are terminated (in reverse order) before the error is rethrown. Previously these resources leaked and the app could not be restarted.health()now factors endpoint health into the overallRpcAppHealthLevel-- an inactive/closed endpoint degrades the app to unhealthy instead of reportinghealthy.RpcContainer.tryGet<T>()no longer swallows aStateErrorthrown inside a registered factory (it now checkshas<T>()first), so factory failures propagate instead of being misreported as "not registered".
New API:
RpcContainer.registerLazySingleton<T>()-- memoizes a single shared instance on firstget()(registerFactorykeeps its per-call semantics).
0.3.1 #
- Updated to
rpc_dart: ^3.1.0.
0.3.0 #
- Resilience primitives moved to
rpc_dartcore:RpcRetryInterceptor,RpcCircuitBreakerInterceptor,RpcClientConnection,RpcRateLimiter,BackoffPolicy. RpcApp: addedafterModulesStarthook for post-startup logic.RpcServerModule: integratedRpcHttpServersupport.RpcTestApp: improved test harness with fault injection viaRpcFaultInjector.RpcCallSpy: added call observation for testing and debugging.- Updated to
rpc_dart: ^3.0.0.
0.2.0 #
- Added
RpcClientConnectionwith reconnect state machine. - Added per-key dynamic rate limiting with
keyExtractortoRpcRateLimiter. - Added
perKeyFallbacktoRpcRateLimiter. - Replaced
RpcRateLimiterwith pluggable rate limit algorithms. - Removed
RpcClientModule; addedRpcClientConnectiontests.
0.1.0 #
- Initial release:
RpcApp,RpcModule,RpcContainer,RpcServerModule,RpcIsolateModule, health monitoring, rate limiter, test harness.