UNPKG

712 BTypeScriptView Raw
1import * as Rx from 'rxjs';
2import { Command } from '../command';
3import { Logger } from '../logger';
4import { FlowController } from './flow-controller';
5export type RestartDelay = number | 'exponential';
6/**
7 * Restarts commands that fail up to a defined number of times.
8 */
9export declare class RestartProcess implements FlowController {
10 private readonly logger;
11 private readonly scheduler?;
12 private readonly delay;
13 readonly tries: number;
14 constructor({ delay, tries, logger, scheduler, }: {
15 delay?: RestartDelay;
16 tries?: number;
17 logger: Logger;
18 scheduler?: Rx.SchedulerLike;
19 });
20 handle(commands: Command[]): {
21 commands: Command[];
22 };
23}