-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Miniflare 3] Add
getFetcher()
for dispatching fetch
/scheduled
/…
…`queue` events (#708) * Add `getFetcher()` for dispatching `fetch`/`scheduled`/`queue` events This change adds back support for dispatching `scheduled` and `queue` events directly. Miniflare 2 previously provided similar `dispatchScheduled()` and `dispatchQueue()` methods, but these implemented an inconsistent, non-standard API. With `getFetcher()`, we're able to reuse magic proxy code to support arbitrary Workers APIs. This is important for `queue()`, which supports sending any structured serialisable as a message `body`. `getFetcher()` also provides an idiomatic Miniflare API for dealing with multiple workers, matching that provided by `getBindings()`. * rename getFetcher to getWorker --------- Co-authored-by: Rahul Sethi <5822355+RamIdeas@users.noreply.github.com>
- Loading branch information
Showing
4 changed files
with
150 additions
and
5 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