UNPKG

@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.

20 lines (19 loc) 1.07 kB
/** * @module CircuitBreaker */ import { type ICircuitBreakerStorageAdapter, type ICircuitBreakerStorageAdapterTransaction } from "../../../../circuit-breaker/contracts/_module.js"; import { type IReadableContext } from "../../../../execution-context/contracts/_module.js"; import { type InvokableFn } from "../../../../utilities/_module.js"; /** * The `NoOpCircuitBreakerStorageAdapter` will do nothing and is used for easily mocking {@link ICircuitBreakerFactory | `ICircuitBreakerFactory`} for testing. * * IMPORT_PATH: `"@daiso-tech/core/circuit-breaker/database-circuit-breaker-storage-adapter"` * @group Adapters */ export declare class NoOpCircuitBreakerStorageAdapter<TType> implements ICircuitBreakerStorageAdapter<TType> { transaction<TValue>(_context: IReadableContext, fn: InvokableFn<[ transaction: ICircuitBreakerStorageAdapterTransaction<TType> ], Promise<TValue>>): Promise<TValue>; find(_context: IReadableContext, _key: string): Promise<TType | null>; remove(_context: IReadableContext, _key: string): Promise<void>; }