Commit Detail
Commit 87e1983
Loopback service stubs accept a dynamic version (cohort) parameter
Similar to `props`, this allows a worker to call the service stub as a
function, passing along the given version information (currently only a
cohort string) to the runtime.
workerd's server implementation currently ignores this information, so
the test included in this commit is very minimal. We could come up with
a better test once we've decided how this information will be exposed to
the worker, assuming it also makes sense in the workerd runtime. The
internal codebase tests this feature in more depth.
The feature is behind the experimental `enable_version_api` flag. Usage
looks like:
`let service = ctx.exports.default({ version: { cohort: "blah" } });`
Files changed
9 files changed~9 modified