UNPKG

aws-cdk

Version:

CDK Toolkit, the command line tool for CDK apps

45 lines (44 loc) 1.42 kB
import { ICloudFormationClient } from '../aws-auth'; export declare class ActiveAssetCache { private readonly stacks; rememberStack(stackTemplate: string): void; contains(asset: string): boolean; } export declare function refreshStacks(cfn: ICloudFormationClient, activeAssets: ActiveAssetCache, qualifier?: string): Promise<void>; /** * Background Stack Refresh properties */ export interface BackgroundStackRefreshProps { /** * The CFN SDK handler */ readonly cfn: ICloudFormationClient; /** * Active Asset storage */ readonly activeAssets: ActiveAssetCache; /** * Stack bootstrap qualifier */ readonly qualifier?: string; } /** * Class that controls scheduling of the background stack refresh */ export declare class BackgroundStackRefresh { private readonly props; private timeout?; private lastRefreshTime; private queuedPromises; constructor(props: BackgroundStackRefreshProps); start(): void; private refresh; private justRefreshedStacks; /** * Checks if the last successful background refresh happened within the specified time frame. * If the last refresh is older than the specified time frame, it returns a Promise that resolves * when the next background refresh completes or rejects if the refresh takes too long. */ noOlderThan(ms: number): Promise<unknown>; stop(): void; }