import { SessionTo } from "../session"; import { On } from "./on"; import JvmErrors = io.gatling.javaapi.core.error.Errors; export interface ExitBlockOnFailFunction> { /** * Define a block that is interrupted for a given virtual user if it experiences a failure. * * @returns a DSL component for defining the tried block */ (): On; } export interface TryMaxFunction> { /** * Define a block that is interrupted and retried for a given virtual user if it experiences a failure. * * @param times - the maximum number of tries, including the first one (hence number of retries + 1) * @returns a DSL component for defining the tried block */ (times: number | string | SessionTo): On; /** * Define a block that is interrupted and retried for a given virtual user if it experiences a failure. * * @param times - the maximum number of tries, including the first one (hence number of retries + 1) * @param counterName - the name of the loop counter, as stored in the Session * @returns a DSL component for defining the tried block */ (times: number | string | SessionTo, counterName: string): On; } export interface ExitHereIfFunction> { /** * Have the virtual user exit here if the condition holds true * * @param condition - the condition, expressed as a Gatling Expression Language String * @returns a new StructureBuilder */ (condition: string): T; /** * Have the virtual user exit here if the condition holds true * * @param condition - the condition, expressed as a function * @returns a new StructureBuilder */ (condition: SessionTo): T; } export interface ExitHereFunction> { /** * Have the virtual user exit here * * @returns a new StructureBuilder */ (): T; } export interface ExitHereIfFailedFunction> { /** * Have the virtual user exit here if the state of its Session is failed * * @returns a new StructureBuilder */ (): T; } export interface StopLoadGeneratorFunction> { /** * Have the virtual user abruptly stop the load generator with a successful status * * @param message - the message, expressed as a Gatling Expression Language String * @returns a new StructureBuilder */ (message: string): T; /** * Have the virtual user abruptly stop the load generator with a successful status * * @param message - the message, expressed as a function * @returns a new StructureBuilder */ (message: SessionTo): T; } export interface StopLoadGeneratorIfFunction> { /** * Have the virtual user abruptly stop the load generator with a successful status if a condition * is met * * @param message - the message, expressed as a Gatling Expression Language String * @param condition - the condition, expressed as a Gatling Expression Language String * @returns a new StructureBuilder */ (message: string, condition: string): T; /** * Have the virtual user abruptly stop the load generator with a successful status if a condition * is met * * @param message - the message, expressed as a Gatling Expression Language String * @param condition - the condition, expressed as a function * @returns a new StructureBuilder */ (message: string, condition: SessionTo): T; /** * Have the virtual user abruptly stop the load generator with a successful status if a condition * is met * * @param message - the message, expressed as a function * @param condition - the condition, expressed as a Gatling Expression Language String * @returns a new StructureBuilder */ (message: SessionTo, condition: string): T; /** * Have the virtual user abruptly stop the load generator with a successful status if a condition * is met * * @param message - the message, expressed as a function * @param condition - the condition, expressed as a function * @returns a new StructureBuilder */ (message: SessionTo, condition: SessionTo): T; } export interface CrashLoadGeneratorFunction> { /** * Have the virtual user abruptly stop the load generator with a failed status * * @param message - the message, expressed as a Gatling Expression Language String * @returns a new StructureBuilder */ (message: string): T; /** * Have the virtual user abruptly crash the load generator with a failed status * * @param message - the message, expressed as a function * @returns a new StructureBuilder */ (message: SessionTo): T; } export interface CrashLoadGeneratorIfFunction> { /** * Have the virtual user abruptly crash the load generator with a failed status if a condition is * met * * @param message - the message, expressed as a Gatling Expression Language String * @param condition - the condition, expressed as a Gatling Expression Language String * @returns a new StructureBuilder */ (message: string, condition: string): T; /** * Have the virtual user abruptly crash the load generator with a failed status if a condition is * met * * @param message - the message, expressed as a Gatling Expression Language String * @param condition - the condition, expressed as a function * @returns a new StructureBuilder */ (message: string, condition: SessionTo): T; /** * Have the virtual user abruptly crash the load generator with a failed status if a condition is * met * * @param message - the message, expressed as a function * @param condition - the condition, expressed as a Gatling Expression Language String * @returns a new StructureBuilder */ (message: SessionTo, condition: string): T; /** * Have the virtual user abruptly crash the load generator with a failed status if a condition is * met * * @param message - the message, expressed as a function * @param condition - the condition, expressed as a function * @returns a new StructureBuilder */ (message: SessionTo, condition: SessionTo): T; } export interface Errors> { exitBlockOnFail: ExitBlockOnFailFunction; tryMax: TryMaxFunction; exitHereIf: ExitHereIfFunction; exitHere: ExitHereFunction; exitHereIfFailed: ExitHereIfFailedFunction; stopLoadGenerator: StopLoadGeneratorFunction; stopLoadGeneratorIf: StopLoadGeneratorIfFunction; crashLoadGenerator: CrashLoadGeneratorFunction; crashLoadGeneratorIf: CrashLoadGeneratorIfFunction; } export declare const errorsImpl: , T extends Errors>(jvmErrors: J1, wrap: (wrapped: J2) => T) => Errors;