Current problem
Allow cancelling queries and reads with Fetch standard AbortController.
Possible solution
- Accept an optional
{ signal?: AbortSignal } (either in QueryOptions or as a final arg).
- Propagate
signal and abort should close streams/iterators and reject with AbortError.
Additional context
Example:
const ctrl = new AbortController();
for await (const r of bucket.query(name, s, e, { ...opts }, { signal: ctrl.signal })) { ... }
ctrl.abort();
Code of Conduct