///
import { Config } from './common-types';
import { EventEmitter } from 'events';
/**
* Get Application live status
* @param {Object} config
*/
export declare const getLiveStatus: (config: Config, debugName?: string) => Promise<{
fronts: any;
workers: any;
}>;
export interface ProgressionInfo {
progressDetail: any;
config: Config;
recipeId: string;
}
export interface ProgressionSuccess {
front: any;
progressDetail: any;
config: Config;
recipeId: string;
}
export interface ProgressionError {
progressDetail?: any;
config: Config;
recipeId: string;
cause: ProgressFailureCauses;
failure?: any;
}
export declare enum ProgressEvents {
/**
* Event that is triggered when progression update is received.
* The data associated to this event is a ProgressionInfo.
*
* @see {ProgressionInfo}
*/
PROGRESSION = "progression",
/**
* Event that is triggered when there is an error:
* - either when the server indicates that there is an unrecoverable error (cause will be ProgressFailureCauses.UNRECOVERABLE_ERRORS)
* - or when the server has succeeded but gathering additional information has failed (cause will be ProgressFailureCauses.LIVE_STATUS_FAILED)
* - or when the progression can't be retrieved from server after 10 retries (cause will be ProgressFailureCauses.PROGRESSION_UNAVAILABLE)
*
* The data associated to this event is a ProgressionError.
*
* @see {ProgressionError}
* @see {ProgressFailureCauses}
*/
FAILED = "failed",
/**
* Event that is triggered when the deployment has suceeded.
* The data associated to this event is a ProgressionSuccess.
*
* @see {ProgressionSuccess}
*/
SUCCESS = "success"
}
export declare enum ProgressFailureCauses {
UNRECOVERABLE_ERRORS = "UNRECOVERABLE_ERRORS",
LIVE_STATUS_FAILED = "LIVE_STATUS_FAILED",
PROGRESSION_UNAVAILABLE = "PROGRESSION_UNAVAILABLE",
PROGRESSION_RETRYING = "PROGRESSION_RETRYING"
}
export declare const defaultBackoff: (delay: number, remainingRetries: number, maxRetries: number) => number;
/**
* Ask the state of the progression for the deployment represented by the parameter `recipeId`.
* The progression doesn't return anything but instead will emit events.
*
* When progresion can't be retrieved, the progression will be retried with backoff policy.
* By default, the backoff policy will work like this:
* - 1st retry after 500ms
* - 2nd retry after 1s
* - 3rd retry after 2s
* - 4th retry after 4s
* - 5th retry after 8s
* - ...
*
* @param config The ZetaPush configuration (login/password, appName...)
* @param recipeId The identifier of either the recipe or the deployment. This is the identifier provided by the server when requesting a deployment.
* @return {EventEmitter} event emitter to be notified about progression
*
* @fires ProgressEvents#PROGRESSION
* @fires ProgressEvents#FAILED
* @fires ProgressEvents#SUCCESS
*/
export declare const getDeploymentProgression: (config: Config, recipeId: string, pollDelay?: number, maxRetries?: number, retryBackoff?: (currentDelay: number, remainingRetries: number, maxRetries: number) => number) => EventEmitter;
export declare const checkQueueServiceDeployed: (config: Config, recipeId: string, pollDelay?: number, maxRetries?: number, retryBackoff?: (currentDelay: number, remainingRetries: number, maxRetries: number) => number) => Promise;