import { ICommonTargetOptions, ILogEntry, ITargetsOption, LogTarget } from "@spinajs/log-common"; import { ResiliencePipeline } from "@spinajs/util"; /** * Options for {@link RetryingTarget}. */ export interface IRetryingTargetOptions extends ICommonTargetOptions { options: { /** * Inline child target this wrapper decorates. Resolved through DI exactly * like a top-level target. */ target: ITargetsOption; /** * Total number of write attempts ( the first try plus retries ). Default 3. */ maxAttempts?: number; /** * Base delay in milliseconds between retries ( exponential backoff + jitter * is applied on top ). Default 100. */ delayMs?: number; }; } /** * Wraps ONE inner target and RETRIES its `write` when it REJECTS, using the * `@spinajs/util` resilience pipeline ( exponential backoff + jitter ). Only * useful for targets that surface failure by rejecting ( console / custom / * strict ) — self-healing targets ( File / Loki / OTLP ) own their reliability * and resolve, so wrapping them is a no-op. See the write() rejection contract * on {@link LogTarget.write}. * * The inner target is declared inline and owned by this wrapper ( resolve / * flush / dispose ). Pure / browser-safe - just delegates to its child. */ export declare class RetryingTarget extends LogTarget { protected Inner: LogTarget; /** Reusable retry pipeline guarding the inner write. */ protected RetryPipeline: ResiliencePipeline; resolve(): void; write(entry: ILogEntry): Promise; forceFlush(): Promise; dispose(): Promise; } //# sourceMappingURL=RetryingTarget.d.ts.map