streamComputeResult
Stream a compute result instead of fetching it through a URL.
New in v2.
Usage
const = await .({ : 'a-job-id' })
for await (const of ) {
..()
} Preferable for large results: nothing is buffered in memory, and you can begin processing before the transfer finishes.
Returns
- Type:
ComputeResultStream
An AsyncIterable<Uint8Array>.
Parameters
config
- Type:
ComputeResultConfig
Same as getComputeResult. resultIndex defaults
to 0 here rather than searching for the output entry.