import JvmFeederBuilder = io.gatling.javaapi.core.FeederBuilder; import JvmFeederBuilderFileBased = io.gatling.javaapi.core.FeederBuilder$FileBased; import JvmFeederBuilderSeparatedValues = io.gatling.javaapi.core.FeederBuilder$SeparatedValues; import { Wrapper } from "./common"; export interface FeederBuilder extends Wrapper> { /** * Set a queue strategy. Records will be provided in the same order as defined in the underlying * source. A given record will only be provided once. The run will be immediately stopped if the * feeder runs out of records. * * @returns a new FeederBuilder */ queue(): FeederBuilder; /** * Set a random strategy. Records will be provided in a random order, unrelated to the order in * the underlying source. A given record can be provided multiple times. Such feeder will never * run out of records. * * @returns a new FeederBuilder */ random(): FeederBuilder; /** * Set a shuffle strategy. Records will be provided in a random order, unrelated to the order in * the underlying source. A given record will only be provided once. The run will be immediately * stopped if the feeder runs out of records. * * @returns a new FeederBuilder */ shuffle(): FeederBuilder; /** * Set a circular strategy. Records will be provided in the same order as defined in the * underlying source. Once the last record of the underlying source is reached, the feeder will go * back to the first record. A given record can be provided multiple times. Such feeder will never * run out of records. * * @returns a new FeederBuilder */ circular(): FeederBuilder; /** * Provide a function to transform records as defined in the underlying source * * @param f - the transformation function * @returns a new FeederBuilder */ transform(f: (name: string, value: T) => unknown): FeederBuilder; /** * Return the number of records more efficiantly than readRecords().size(). * * @returns the number of recordss */ recordsCount(): number; /** * Distribute data evenly amongst all the injectors of a Gatling Enterprise cluster. Only * effective when the test is running with Gatling Enterprise, noop otherwise. * * @returns a new FeederBuilder */ shard(): FeederBuilder; } export interface FileBasedFeederBuilder extends FeederBuilder { queue(): FileBasedFeederBuilder; random(): FileBasedFeederBuilder; shuffle(): FileBasedFeederBuilder; circular(): FileBasedFeederBuilder; shard(): FileBasedFeederBuilder; unzip(): FileBasedFeederBuilder; } export declare const wrapFileBasedFeederBuilder: (_underlying: JvmFeederBuilderFileBased) => FileBasedFeederBuilder; export interface SeparatedValuesFeederBuilder extends FileBasedFeederBuilder { queue(): SeparatedValuesFeederBuilder; random(): SeparatedValuesFeederBuilder; shuffle(): SeparatedValuesFeederBuilder; circular(): SeparatedValuesFeederBuilder; shard(): SeparatedValuesFeederBuilder; unzip(): SeparatedValuesFeederBuilder; /** * Provide the column names of a file that doesn't have a header line. The first line of the * file is then a record like all the other ones. * * @param firstHeader - the first column name * @param otherHeaders - the other column names * @returns a new SeparatedValuesFeederBuilder */ headers(firstHeader: string, ...otherHeaders: string[]): SeparatedValuesFeederBuilder; } export declare const wrapSeparatedValuesFeederBuilder: (_underlying: JvmFeederBuilderSeparatedValues) => SeparatedValuesFeederBuilder; export interface CsvFunction { /** * Bootstrap a new {@link https://datatracker.ietf.org/doc/html/rfc4180 | CSV file} based feeder * * @param filePath - the path of the file, relative to the root of the resources folder * @returns a new feeder */ (filePath: string): SeparatedValuesFeederBuilder; /** * Bootstrap a new {@link https://datatracker.ietf.org/doc/html/rfc4180 | CSV file} based feeder * * @param filePath - the path of the file, relative to the root of the resources folder * @param quoteChar - the quote char to wrap values containing special characters * @returns a new feeder */ (filePath: string, quoteChar: string): SeparatedValuesFeederBuilder; } export declare const csv: CsvFunction; export interface SsvFunction { /** * Bootstrap a new {@link https://datatracker.ietf.org/doc/html/rfc4180 | CSV file} based feeder, where the separator * is a semi-colon * * @param filePath - the path of the file, relative to the root of the resources folder * @returns a new feeder */ (filePath: string): SeparatedValuesFeederBuilder; /** * Bootstrap a new {@link https://datatracker.ietf.org/doc/html/rfc4180 | CSV file} based feeder, where the separator * is a semi-colon * * @param filePath - the path of the file, relative to the root of the resources folder * @param quoteChar - the quote char to wrap values containing special characters (must be a single character) * @returns a new feeder */ (filePath: string, quoteChar: string): SeparatedValuesFeederBuilder; } export declare const ssv: SsvFunction; export interface TsvFunction { /** * Bootstrap a new {@link https://datatracker.ietf.org/doc/html/rfc4180 | CSV file} based feeder, where the separator * is a tab * * @param filePath - the path of the file, relative to the root of the resources folder * @returns a new feeder */ (filePath: string): SeparatedValuesFeederBuilder; /** * Bootstrap a new {@link https://datatracker.ietf.org/doc/html/rfc4180 | CSV file} based feeder, where the separator * is a tab * * @param filePath - the path of the file, relative to the root of the resources folder * @param quoteChar - the quote char to wrap values containing special characters (must be a single character) * @returns a new feeder */ (filePath: string, quoteChar: string): SeparatedValuesFeederBuilder; } export declare const tsv: TsvFunction; export interface SeparatedValuesFunction { /** * Bootstrap a new {@link https://datatracker.ietf.org/doc/html/rfc4180 | CSV file} based feeder, where the separator * is a tab * * @param filePath - the path of the file, relative to the root of the resources folder * @param separator - the provided separator char (must be a single character) * @returns a new feeder */ (filePath: string, separator: string): SeparatedValuesFeederBuilder; /** * Bootstrap a new {@link https://datatracker.ietf.org/doc/html/rfc4180 | CSV file} based feeder, where the separator * is a tab * * @param filePath - the path of the file, relative to the root of the resources folder * @param separator - the provided separator char (must be a single character) * @param quoteChar - the quote char to wrap values containing special characters (must be a single character) * @returns a new feeder */ (filePath: string, separator: string, quoteChar: string): SeparatedValuesFeederBuilder; } export declare const separatedValues: SeparatedValuesFunction; /** * Bootstrap a new JSON file based feeder * * @param filePath - the path of the file, relative to the root of the resources folder * @returns a new feeder */ export declare const jsonFile: (filePath: string) => FileBasedFeederBuilder; /** * Bootstrap a new JSON API based feeder * * @param url - the url of the API * @returns a new feeder */ export declare const jsonUrl: (url: string) => FeederBuilder; /** * Bootstrap a new in-memory array of Maps based feeder * * @param data - the in-memory data * @returns a new feeder */ export declare const arrayFeeder: (data: Array>) => FeederBuilder;