File
Blob: types/defines/wfp.d.ts
| 1 | interface DynamicDispatchLimits { |
| 2 | /** |
| 3 | * Limit CPU time in milliseconds. |
| 4 | */ |
| 5 | cpuMs?: number; |
| 6 | /** |
| 7 | * Limit number of subrequests. |
| 8 | */ |
| 9 | subRequests?: number; |
| 10 | } |
| 11 | |
| 12 | interface DynamicDispatchOptions { |
| 13 | /** |
| 14 | * Limit resources of invoked Worker script. |
| 15 | */ |
| 16 | limits?: DynamicDispatchLimits |
| 17 | /** |
| 18 | * Arguments for outbound Worker script, if configured. |
| 19 | */ |
| 20 | outbound?: {[key: string]: any} |
| 21 | } |
| 22 | |
| 23 | interface DispatchNamespace { |
| 24 | /** |
| 25 | * @param name Name of the Worker script. |
| 26 | * @param args Arguments to Worker script. |
| 27 | * @param options Options for Dynamic Dispatch invocation. |
| 28 | * @returns A Fetcher object that allows you to send requests to the Worker script. |
| 29 | * @throws If the Worker script does not exist in this dispatch namespace, an error will be thrown. |
| 30 | */ |
| 31 | get(name: string, args?: {[key: string]: any}, options?: DynamicDispatchOptions ): Fetcher; |
| 32 | } |