sint_sentinel 1.1.0
sint_sentinel: ^1.1.0 copied to clipboard
Circuit Breaker, Rate Limiter, Logger & Snapshot Auditor for Flutter. Protects against excessive API calls, infinite rebuild loops, and cascading failures.
Changelog #
1.1.0 #
Logger Integration — Application-Level Logging #
sint_sentinel is now the centralized logger for your entire Flutter application.
SintSentinel.logger: StaticLoggerinstance available everywhere viaSintSentinel.logger.d(),.i(),.w(),.e(),.t(),.f().SintSentinel.configureLogger(): Replace the default logger with a customLoggerinstance (custom printers, output, filters).- Re-exports:
Logger,Level,PrettyPrinter,LogPrinter,DateTimeFormatfrompackage:logger— consumers don't need a separateloggerdependency. - Guard logging:
SintSentinel.guard()now logs blocked calls, successful calls, and failures automatically with tags. - Init logging:
SintSentinel.init()logs initialization and circuit state on startup.
Dependencies #
- Added
logger: ^2.7.0as a dependency.
1.0.1 #
- Fix: Replaced
hivedirect dependency withhive_flutter(re-exports all ofhive). - Fix: Description length for pub.dev compliance.
- Added WASM compatibility roadmap to README.
- Added platform support table to README.
- Added
.pubignoreto exclude build artifacts.
1.0.0 #
- Initial stable release.
- Circuit Breaker: Three-state machine (CLOSED / OPEN / HALF_OPEN) with configurable thresholds.
- TrafficWatchdog: Sliding 60-second request rate limiter + daily read/write quotas.
- StateWatchdog: Widget rebuild frequency monitor to detect infinite loops.
- SentinelRebuildMonitor: Mixin for
Statesubclasses with three-tier response (throttle, warn, trip). - SentinelApp: Drop-in root widget that shows a maintenance page when the circuit is open.
- SintSentinel.guard(): Generic async wrapper that gates any operation through the circuit.
- SentinelSnapshot: Immutable point-in-time capture of circuit state, traffic metrics, and rebuild offenders.
- SentinelSnapshotStore: Persistent ring buffer (Hive, last 50) with auto-capture on every trip.
- Snapshot API:
SintSentinel.capture(),.latestSnapshot,.snapshotHistory,.recentSnapshots(duration). - Exponential backoff: Open duration doubles on each trip (capped at 5 minutes).
- Hive persistence: Circuit state, counters, traffic history, and snapshots survive app restarts.
- Three config presets:
development(),production(),strict(). - Benchmark suite: Cold init, guard throughput, watchdog overhead, Rx propagation.