-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add native support for warmup trigger (#180)
* Add warmup trigger * Additional changes to types * Add back trigger property * Minor changes to docs, types, signatures * Revert a few minor edits * PR review suggestions * Add interface for warmupContext
- Loading branch information
Showing
7 changed files
with
53 additions
and
2 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
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
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
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
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
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
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,17 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
import { FunctionOptions, FunctionResult, FunctionTrigger } from './index'; | ||
import { InvocationContext } from './InvocationContext'; | ||
|
||
export interface WarmupContextOptions {} | ||
export type WarmupHandler = (warmupContext: WarmupContextOptions, context: InvocationContext) => FunctionResult; | ||
|
||
export interface WarmupFunctionOptions extends WarmupTriggerOptions, Partial<FunctionOptions> { | ||
handler: WarmupHandler; | ||
|
||
trigger?: WarmupTrigger; | ||
} | ||
|
||
export interface WarmupTriggerOptions {} | ||
export type WarmupTrigger = FunctionTrigger & WarmupTriggerOptions; |