Expand description
A Worker group’s index.ts (#3562, G2b step 2c-4b).
A [deploy.workers.<key>] group is one Worker over several contexts. Each
member’s entry is emitted as <member>.index.ts in member mode
(workers_entry.rs), which marks the router’s own misses; the group’s entry
is the Worker’s main and dispatches to the members:
fetchtries the members in the order the manifest lists them. A marked response is a miss and the next member is tried; the first unmarked one is the answer (a handler’s own404included). If every member misses, the answer is the first marked response that is not a404(the synthesised405/204), with theAllowof all such responses merged, since two members may serve one path under different methods; else the single-contextNot Found.scheduledruns every member whose cron matches,queuegoes to the member consumingbatch.queue,emailto the member claiming the recipient.- Agent, events fan-out and container classes are re-exported by name (a
member entry exports
isMiss, soexport *over members would collide).
A request to the internal /_bynk/call, /_bynk/event, /_bynk/migrate or
(in a bynk dev build only) /_bynk/inspect prefix that no member claims is answered as a standalone Worker answers it
unauthenticated: the same method gate, then the same 413 or 401 the
runtime’s verifyCall gives. Answering 404 for an unknown service while a
known one answers 401 would let an unsigned caller list a group’s services.
Structs§
- Group
Entry - The group as a whole.
- Group
Member - What the group’s entry needs to know of one member.
Functions§
- emit_
group_ entry - The group’s
index.ts.