@daiso-tech/core
Version:
The library offers flexible, framework-agnostic solutions for modern web applications, built on adaptable components that integrate seamlessly with popular frameworks like Next Js.
24 lines • 693 B
JavaScript
/**
* @module CircuitBreaker
*/
import {} from "../../../../circuit-breaker/contracts/_module.js";
import {} from "../../../../utilities/_module.js";
/**
* IMPORT_PATH: `"@daiso-tech/core/circuit-breaker/database-circuit-breaker-storage-adapter"`
* @group Adapters
*/
export class NoOpCircuitBreakerStorageAdapter {
transaction(fn) {
return Promise.resolve(fn({
find: (_key) => Promise.resolve(null),
upsert: (_key, _state) => Promise.resolve(),
}));
}
find(_key) {
return Promise.resolve(null);
}
remove(_key) {
return Promise.resolve();
}
}
//# sourceMappingURL=no-op-circuit-breaker-storage-adapter.js.map