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: it streams the job's
output result, outputs.tar (a tar archive), unless resultIndex names another.
Throws when the node does not know the job, when the job has not finished, or when it has
no such result — the cases where getComputeResult returns undefined.