-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
export type WarmerConfig = { | ||
flag: string, | ||
concurrency: string, | ||
test: string, | ||
log: boolean, | ||
correlationId: string, | ||
delay: number, | ||
}; | ||
|
||
/** | ||
* Returns a Promise that resolves to true if the current invocation is a warming | ||
* invocation and false otherwise. If this is a warming invocation, the Promise will | ||
* wait until the delay specified by `config.delay` has passed. | ||
* | ||
* @param event the event passed to the lambda | ||
* @param [config] the config options to change lambda warmer's default behavior. All of | ||
* the settings are optional | ||
* | ||
* @returns a Promise that resolves to true if this is a warming invocation | ||
*/ | ||
function warmer(event: any, config?: WarmerConfig): Promise<boolean>; | ||
|
||
export = warmer; |