import { FailureType } from '../types/failures.ts'; import type { FailureScenario } from '../types/failures.ts'; import type { Connection } from './connection.ts'; import type { Cache, Database, LoadBalancer, Server } from './components.ts'; export declare abstract class Failure { readonly type: TType; protected constructor(type: TType); abstract toJSON(): FailureScenario; } export interface ServerCrashProps { triggerTime: number; recoveryTime: number; } export declare class ServerCrash extends Failure { readonly target: Server | Database; readonly props: Readonly; constructor(target: Server | Database, props: ServerCrashProps); toJSON(): FailureScenario; } export interface LatencySpikeProps { triggerTime: number; duration: number; factor: number; } export declare class LatencySpike extends Failure { readonly target: Server | Database; readonly props: Readonly; constructor(target: Server | Database, props: LatencySpikeProps); toJSON(): FailureScenario; } export interface CpuReductionProps { triggerTime: number; duration: number; reductionPercent: number; } export declare class CpuReduction extends Failure { readonly target: Server; readonly props: Readonly; constructor(target: Server, props: CpuReductionProps); toJSON(): FailureScenario; } export interface NetworkPartitionProps { triggerTime: number; duration: number; } export declare class NetworkPartition extends Failure { readonly connection: Connection; readonly props: Readonly; constructor(connection: Connection, props: NetworkPartitionProps); toJSON(): FailureScenario; } export interface CacheFlushProps { triggerTime: number; } export declare class CacheFlush extends Failure { readonly target: Cache; readonly props: Readonly; constructor(target: Cache, props: CacheFlushProps); toJSON(): FailureScenario; } export interface RandomErrorProps { triggerTime: number; duration: number; errorRate: number; } export declare class RandomError extends Failure { readonly target: Server | LoadBalancer; readonly props: Readonly; constructor(target: Server | LoadBalancer, props: RandomErrorProps); toJSON(): FailureScenario; } export type AnyFailure = ServerCrash | LatencySpike | CpuReduction | NetworkPartition | CacheFlush | RandomError; //# sourceMappingURL=failures.d.ts.map