ethereumjs-client › "sync/fetcher/fetcher" › Fetcher
Base class for fetchers that retrieve various data from peers. Subclasses must request() and process() methods. Tasks can be arbitrary objects whose structure is defined by subclasses. A priority queue is used to ensure tasks are fetched inorder.
memberof
module:sync/fetcher
-
Readable
↳ Fetcher
- ReadableStream
- config
- destroyed
- readable
- readableEncoding
- readableEnded
- readableFlowing
- readableHighWaterMark
- readableLength
- readableObjectMode
- [Symbol.asyncIterator]
- _destroy
- _read
- addListener
- dequeue
- destroy
- emit
- enqueue
- error
- eventNames
- expire
- failure
- fetch
- getMaxListeners
- isPaused
- listenerCount
- listeners
- next
- off
- on
- once
- pause
- peer
- pipe
- prependListener
- prependOnceListener
- process
- push
- rawListeners
- read
- removeAllListeners
- removeListener
- request
- resume
- setEncoding
- setMaxListeners
- store
- success
- tasks
- unpipe
- unshift
- wait
- wrap
- write
- from
+ new Fetcher(options
: FetcherOptions): Fetcher
Overrides void
Defined in lib/sync/fetcher/fetcher.ts:51
Create new fetcher
Parameters:
Name | Type |
---|---|
options |
FetcherOptions |
Returns: Fetcher
• config: Config
Defined in lib/sync/fetcher/fetcher.ts:37
• destroyed: boolean
Inherited from Fetcher.destroyed
Defined in node_modules/@types/node/stream.d.ts:35
• readable: boolean
Inherited from Fetcher.readable
Defined in node_modules/@types/node/stream.d.ts:28
• readableEncoding: BufferEncoding | null
Inherited from Fetcher.readableEncoding
Defined in node_modules/@types/node/stream.d.ts:29
• readableEnded: boolean
Inherited from Fetcher.readableEnded
Defined in node_modules/@types/node/stream.d.ts:30
• readableFlowing: boolean | null
Inherited from Fetcher.readableFlowing
Defined in node_modules/@types/node/stream.d.ts:31
• readableHighWaterMark: number
Inherited from Fetcher.readableHighWaterMark
Defined in node_modules/@types/node/stream.d.ts:32
• readableLength: number
Inherited from Fetcher.readableLength
Defined in node_modules/@types/node/stream.d.ts:33
• readableObjectMode: boolean
Inherited from Fetcher.readableObjectMode
Defined in node_modules/@types/node/stream.d.ts:34
▸ [Symbol.asyncIterator](): AsyncIterableIterator‹any›
Inherited from Fetcher.[Symbol.asyncIterator]
Defined in node_modules/@types/node/stream.d.ts:124
Returns: AsyncIterableIterator‹any›
▸ _destroy(error
: Error | null, callback
: function): void
Inherited from Fetcher._destroy
Defined in node_modules/@types/node/stream.d.ts:47
Parameters:
▪ error: Error | null
▪ callback: function
▸ (error?
: Error | null): void
Parameters:
Name | Type |
---|---|
error? |
Error | null |
Returns: void
▸ _read(): void
Overrides void
Defined in lib/sync/fetcher/fetcher.ts:116
Implements Readable._read() by pushing completed tasks to the read queue
Returns: void
▸ addListener(event
: "close", listener
: function): this
Inherited from Fetcher.addListener
Overrides Sender.addListener
Defined in node_modules/@types/node/stream.d.ts:61
Event emitter The defined events on documents including:
- close
- data
- end
- error
- pause
- readable
- resume
Parameters:
▪ event: "close"
▪ listener: function
▸ (): void
Returns: this
▸ addListener(event
: "data", listener
: function): this
Inherited from Fetcher.addListener
Overrides Sender.addListener
Defined in node_modules/@types/node/stream.d.ts:62
Parameters:
▪ event: "data"
▪ listener: function
▸ (chunk
: any): void
Parameters:
Name | Type |
---|---|
chunk |
any |
Returns: this
▸ addListener(event
: "end", listener
: function): this
Inherited from Fetcher.addListener
Overrides Sender.addListener
Defined in node_modules/@types/node/stream.d.ts:63
Parameters:
▪ event: "end"
▪ listener: function
▸ (): void
Returns: this
▸ addListener(event
: "error", listener
: function): this
Inherited from Fetcher.addListener
Overrides Sender.addListener
Defined in node_modules/@types/node/stream.d.ts:64
Parameters:
▪ event: "error"
▪ listener: function
▸ (err
: Error): void
Parameters:
Name | Type |
---|---|
err |
Error |
Returns: this
▸ addListener(event
: "pause", listener
: function): this
Inherited from Fetcher.addListener
Overrides Sender.addListener
Defined in node_modules/@types/node/stream.d.ts:65
Parameters:
▪ event: "pause"
▪ listener: function
▸ (): void
Returns: this
▸ addListener(event
: "readable", listener
: function): this
Inherited from Fetcher.addListener
Overrides Sender.addListener
Defined in node_modules/@types/node/stream.d.ts:66
Parameters:
▪ event: "readable"
▪ listener: function
▸ (): void
Returns: this
▸ addListener(event
: "resume", listener
: function): this
Inherited from Fetcher.addListener
Overrides Sender.addListener
Defined in node_modules/@types/node/stream.d.ts:67
Parameters:
▪ event: "resume"
▪ listener: function
▸ (): void
Returns: this
▸ addListener(event
: string | symbol, listener
: function): this
Inherited from Fetcher.addListener
Overrides Sender.addListener
Defined in node_modules/@types/node/stream.d.ts:68
Parameters:
▪ event: string | symbol
▪ listener: function
▸ (...args
: any[]): void
Parameters:
Name | Type |
---|---|
...args |
any[] |
Returns: this
▸ dequeue(): void
Defined in lib/sync/fetcher/fetcher.ts:102
Dequeue all done tasks that completed in order
Returns: void
▸ destroy(error?
: Error): void
Inherited from Fetcher.destroy
Defined in node_modules/@types/node/stream.d.ts:48
Parameters:
Name | Type |
---|---|
error? |
Error |
Returns: void
▸ emit(event
: "close"): boolean
Defined in node_modules/@types/node/stream.d.ts:70
Parameters:
Name | Type |
---|---|
event |
"close" |
Returns: boolean
▸ emit(event
: "data", chunk
: any): boolean
Defined in node_modules/@types/node/stream.d.ts:71
Parameters:
Name | Type |
---|---|
event |
"data" |
chunk |
any |
Returns: boolean
▸ emit(event
: "end"): boolean
Defined in node_modules/@types/node/stream.d.ts:72
Parameters:
Name | Type |
---|---|
event |
"end" |
Returns: boolean
▸ emit(event
: "error", err
: Error): boolean
Defined in node_modules/@types/node/stream.d.ts:73
Parameters:
Name | Type |
---|---|
event |
"error" |
err |
Error |
Returns: boolean
▸ emit(event
: "pause"): boolean
Defined in node_modules/@types/node/stream.d.ts:74
Parameters:
Name | Type |
---|---|
event |
"pause" |
Returns: boolean
▸ emit(event
: "readable"): boolean
Defined in node_modules/@types/node/stream.d.ts:75
Parameters:
Name | Type |
---|---|
event |
"readable" |
Returns: boolean
▸ emit(event
: "resume"): boolean
Defined in node_modules/@types/node/stream.d.ts:76
Parameters:
Name | Type |
---|---|
event |
"resume" |
Returns: boolean
▸ emit(event
: string | symbol, ...args
: any[]): boolean
Defined in node_modules/@types/node/stream.d.ts:77
Parameters:
Name | Type |
---|---|
event |
string | symbol |
...args |
any[] |
Returns: boolean
▸ enqueue(job
: any): void
Defined in lib/sync/fetcher/fetcher.ts:88
Enqueue job
Parameters:
Name | Type | Description |
---|---|---|
job |
any |
Returns: void
▸ error(error
: Error, job?
: any): void
Defined in lib/sync/fetcher/fetcher.ts:201
Handle error
Parameters:
Name | Type | Description |
---|---|---|
error |
Error | error object |
job? |
any | task |
Returns: void
▸ eventNames(): Array‹string | symbol›
Inherited from Sender.eventNames
Defined in node_modules/@types/node/events.d.ts:77
Returns: Array‹string | symbol›
▸ expire(job
: any): void
Defined in lib/sync/fetcher/fetcher.ts:308
Expire job that has timed out and ban associated peer. Timed out tasks will be re-inserted into the queue.
Parameters:
Name | Type |
---|---|
job |
any |
Returns: void
▸ failure(job
: any, error?
: Error): void
Defined in lib/sync/fetcher/fetcher.ts:154
handle failed job completion
Parameters:
Name | Type | Description |
---|---|---|
job |
any | failed job |
error? |
Error |
Returns: void
▸ fetch(): Promise‹undefined | false›
Defined in lib/sync/fetcher/fetcher.ts:246
Run the fetcher. Returns a promise that resolves once all tasks are completed.
Returns: Promise‹undefined | false›
▸ getMaxListeners(): number
Inherited from Sender.getMaxListeners
Defined in node_modules/@types/node/events.d.ts:69
Returns: number
▸ isPaused(): boolean
Inherited from Fetcher.isPaused
Defined in node_modules/@types/node/stream.d.ts:42
Returns: boolean
▸ listenerCount(event
: string | symbol): number
Inherited from Sender.listenerCount
Defined in node_modules/@types/node/events.d.ts:73
Parameters:
Name | Type |
---|---|
event |
string | symbol |
Returns: number
▸ listeners(event
: string | symbol): Function[]
Inherited from Sender.listeners
Defined in node_modules/@types/node/events.d.ts:70
Parameters:
Name | Type |
---|---|
event |
string | symbol |
Returns: Function[]
▸ next(): any
Defined in lib/sync/fetcher/fetcher.ts:168
Process next task
Returns: any
▸ off(event
: string | symbol, listener
: function): this
Defined in node_modules/@types/node/events.d.ts:66
Parameters:
▪ event: string | symbol
▪ listener: function
▸ (...args
: any[]): void
Parameters:
Name | Type |
---|---|
...args |
any[] |
Returns: this
▸ on(event
: "close", listener
: function): this
Defined in node_modules/@types/node/stream.d.ts:79
Parameters:
▪ event: "close"
▪ listener: function
▸ (): void
Returns: this
▸ on(event
: "data", listener
: function): this
Defined in node_modules/@types/node/stream.d.ts:80
Parameters:
▪ event: "data"
▪ listener: function
▸ (chunk
: any): void
Parameters:
Name | Type |
---|---|
chunk |
any |
Returns: this
▸ on(event
: "end", listener
: function): this
Defined in node_modules/@types/node/stream.d.ts:81
Parameters:
▪ event: "end"
▪ listener: function
▸ (): void
Returns: this
▸ on(event
: "error", listener
: function): this
Defined in node_modules/@types/node/stream.d.ts:82
Parameters:
▪ event: "error"
▪ listener: function
▸ (err
: Error): void
Parameters:
Name | Type |
---|---|
err |
Error |
Returns: this
▸ on(event
: "pause", listener
: function): this
Defined in node_modules/@types/node/stream.d.ts:83
Parameters:
▪ event: "pause"
▪ listener: function
▸ (): void
Returns: this
▸ on(event
: "readable", listener
: function): this
Defined in node_modules/@types/node/stream.d.ts:84
Parameters:
▪ event: "readable"
▪ listener: function
▸ (): void
Returns: this
▸ on(event
: "resume", listener
: function): this
Defined in node_modules/@types/node/stream.d.ts:85
Parameters:
▪ event: "resume"
▪ listener: function
▸ (): void
Returns: this
▸ on(event
: string | symbol, listener
: function): this
Defined in node_modules/@types/node/stream.d.ts:86
Parameters:
▪ event: string | symbol
▪ listener: function
▸ (...args
: any[]): void
Parameters:
Name | Type |
---|---|
...args |
any[] |
Returns: this
▸ once(event
: "close", listener
: function): this
Defined in node_modules/@types/node/stream.d.ts:88
Parameters:
▪ event: "close"
▪ listener: function
▸ (): void
Returns: this
▸ once(event
: "data", listener
: function): this
Defined in node_modules/@types/node/stream.d.ts:89
Parameters:
▪ event: "data"
▪ listener: function
▸ (chunk
: any): void
Parameters:
Name | Type |
---|---|
chunk |
any |
Returns: this
▸ once(event
: "end", listener
: function): this
Defined in node_modules/@types/node/stream.d.ts:90
Parameters:
▪ event: "end"
▪ listener: function
▸ (): void
Returns: this
▸ once(event
: "error", listener
: function): this
Defined in node_modules/@types/node/stream.d.ts:91
Parameters:
▪ event: "error"
▪ listener: function
▸ (err
: Error): void
Parameters:
Name | Type |
---|---|
err |
Error |
Returns: this
▸ once(event
: "pause", listener
: function): this
Defined in node_modules/@types/node/stream.d.ts:92
Parameters:
▪ event: "pause"
▪ listener: function
▸ (): void
Returns: this
▸ once(event
: "readable", listener
: function): this
Defined in node_modules/@types/node/stream.d.ts:93
Parameters:
▪ event: "readable"
▪ listener: function
▸ (): void
Returns: this
▸ once(event
: "resume", listener
: function): this
Defined in node_modules/@types/node/stream.d.ts:94
Parameters:
▪ event: "resume"
▪ listener: function
▸ (): void
Returns: this
▸ once(event
: string | symbol, listener
: function): this
Defined in node_modules/@types/node/stream.d.ts:95
Parameters:
▪ event: string | symbol
▪ listener: function
▸ (...args
: any[]): void
Parameters:
Name | Type |
---|---|
...args |
any[] |
Returns: this
▸ pause(): this
Defined in node_modules/@types/node/stream.d.ts:40
Returns: this
▸ peer(_job?
: any): Peer‹›
Defined in lib/sync/fetcher/fetcher.ts:280
Returns a peer that can process the given job
Parameters:
Name | Type |
---|---|
_job? |
any |
Returns: Peer‹›
▸ pipe‹T›(destination
: T, options?
: undefined | object): T
Defined in node_modules/@types/node/stream.d.ts:5
Type parameters:
▪ T: WritableStream
Parameters:
Name | Type |
---|---|
destination |
T |
options? |
undefined | object |
Returns: T
▸ prependListener(event
: "close", listener
: function): this
Inherited from Fetcher.prependListener
Overrides Sender.prependListener
Defined in node_modules/@types/node/stream.d.ts:97
Parameters:
▪ event: "close"
▪ listener: function
▸ (): void
Returns: this
▸ prependListener(event
: "data", listener
: function): this
Inherited from Fetcher.prependListener
Overrides Sender.prependListener
Defined in node_modules/@types/node/stream.d.ts:98
Parameters:
▪ event: "data"
▪ listener: function
▸ (chunk
: any): void
Parameters:
Name | Type |
---|---|
chunk |
any |
Returns: this
▸ prependListener(event
: "end", listener
: function): this
Inherited from Fetcher.prependListener
Overrides Sender.prependListener
Defined in node_modules/@types/node/stream.d.ts:99
Parameters:
▪ event: "end"
▪ listener: function
▸ (): void
Returns: this
▸ prependListener(event
: "error", listener
: function): this
Inherited from Fetcher.prependListener
Overrides Sender.prependListener
Defined in node_modules/@types/node/stream.d.ts:100
Parameters:
▪ event: "error"
▪ listener: function
▸ (err
: Error): void
Parameters:
Name | Type |
---|---|
err |
Error |
Returns: this
▸ prependListener(event
: "pause", listener
: function): this
Inherited from Fetcher.prependListener
Overrides Sender.prependListener
Defined in node_modules/@types/node/stream.d.ts:101
Parameters:
▪ event: "pause"
▪ listener: function
▸ (): void
Returns: this
▸ prependListener(event
: "readable", listener
: function): this
Inherited from Fetcher.prependListener
Overrides Sender.prependListener
Defined in node_modules/@types/node/stream.d.ts:102
Parameters:
▪ event: "readable"
▪ listener: function
▸ (): void
Returns: this
▸ prependListener(event
: "resume", listener
: function): this
Inherited from Fetcher.prependListener
Overrides Sender.prependListener
Defined in node_modules/@types/node/stream.d.ts:103
Parameters:
▪ event: "resume"
▪ listener: function
▸ (): void
Returns: this
▸ prependListener(event
: string | symbol, listener
: function): this
Inherited from Fetcher.prependListener
Overrides Sender.prependListener
Defined in node_modules/@types/node/stream.d.ts:104
Parameters:
▪ event: string | symbol
▪ listener: function
▸ (...args
: any[]): void
Parameters:
Name | Type |
---|---|
...args |
any[] |
Returns: this
▸ prependOnceListener(event
: "close", listener
: function): this
Inherited from Fetcher.prependOnceListener
Overrides Sender.prependOnceListener
Defined in node_modules/@types/node/stream.d.ts:106
Parameters:
▪ event: "close"
▪ listener: function
▸ (): void
Returns: this
▸ prependOnceListener(event
: "data", listener
: function): this
Inherited from Fetcher.prependOnceListener
Overrides Sender.prependOnceListener
Defined in node_modules/@types/node/stream.d.ts:107
Parameters:
▪ event: "data"
▪ listener: function
▸ (chunk
: any): void
Parameters:
Name | Type |
---|---|
chunk |
any |
Returns: this
▸ prependOnceListener(event
: "end", listener
: function): this
Inherited from Fetcher.prependOnceListener
Overrides Sender.prependOnceListener
Defined in node_modules/@types/node/stream.d.ts:108
Parameters:
▪ event: "end"
▪ listener: function
▸ (): void
Returns: this
▸ prependOnceListener(event
: "error", listener
: function): this
Inherited from Fetcher.prependOnceListener
Overrides Sender.prependOnceListener
Defined in node_modules/@types/node/stream.d.ts:109
Parameters:
▪ event: "error"
▪ listener: function
▸ (err
: Error): void
Parameters:
Name | Type |
---|---|
err |
Error |
Returns: this
▸ prependOnceListener(event
: "pause", listener
: function): this
Inherited from Fetcher.prependOnceListener
Overrides Sender.prependOnceListener
Defined in node_modules/@types/node/stream.d.ts:110
Parameters:
▪ event: "pause"
▪ listener: function
▸ (): void
Returns: this
▸ prependOnceListener(event
: "readable", listener
: function): this
Inherited from Fetcher.prependOnceListener
Overrides Sender.prependOnceListener
Defined in node_modules/@types/node/stream.d.ts:111
Parameters:
▪ event: "readable"
▪ listener: function
▸ (): void
Returns: this
▸ prependOnceListener(event
: "resume", listener
: function): this
Inherited from Fetcher.prependOnceListener
Overrides Sender.prependOnceListener
Defined in node_modules/@types/node/stream.d.ts:112
Parameters:
▪ event: "resume"
▪ listener: function
▸ (): void
Returns: this
▸ prependOnceListener(event
: string | symbol, listener
: function): this
Inherited from Fetcher.prependOnceListener
Overrides Sender.prependOnceListener
Defined in node_modules/@types/node/stream.d.ts:113
Parameters:
▪ event: string | symbol
▪ listener: function
▸ (...args
: any[]): void
Parameters:
Name | Type |
---|---|
...args |
any[] |
Returns: this
▸ process(_job?
: any, _peer?
: any, _result?
: any): void
Defined in lib/sync/fetcher/fetcher.ts:300
Process the reply for the given job
Parameters:
Name | Type |
---|---|
_job? |
any |
_peer? |
any |
_result? |
any |
Returns: void
▸ push(chunk
: any, encoding?
: BufferEncoding): boolean
Defined in node_modules/@types/node/stream.d.ts:46
Parameters:
Name | Type |
---|---|
chunk |
any |
encoding? |
BufferEncoding |
Returns: boolean
▸ rawListeners(event
: string | symbol): Function[]
Inherited from Sender.rawListeners
Defined in node_modules/@types/node/events.d.ts:71
Parameters:
Name | Type |
---|---|
event |
string | symbol |
Returns: Function[]
▸ read(size?
: undefined | number): any
Defined in node_modules/@types/node/stream.d.ts:38
Parameters:
Name | Type |
---|---|
size? |
undefined | number |
Returns: any
▸ removeAllListeners(event?
: string | symbol): this
Inherited from Sender.removeAllListeners
Defined in node_modules/@types/node/events.d.ts:67
Parameters:
Name | Type |
---|---|
event? |
string | symbol |
Returns: this
▸ removeListener(event
: "close", listener
: function): this
Inherited from Fetcher.removeListener
Overrides Sender.removeListener
Defined in node_modules/@types/node/stream.d.ts:115
Parameters:
▪ event: "close"
▪ listener: function
▸ (): void
Returns: this
▸ removeListener(event
: "data", listener
: function): this
Inherited from Fetcher.removeListener
Overrides Sender.removeListener
Defined in node_modules/@types/node/stream.d.ts:116
Parameters:
▪ event: "data"
▪ listener: function
▸ (chunk
: any): void
Parameters:
Name | Type |
---|---|
chunk |
any |
Returns: this
▸ removeListener(event
: "end", listener
: function): this
Inherited from Fetcher.removeListener
Overrides Sender.removeListener
Defined in node_modules/@types/node/stream.d.ts:117
Parameters:
▪ event: "end"
▪ listener: function
▸ (): void
Returns: this
▸ removeListener(event
: "error", listener
: function): this
Inherited from Fetcher.removeListener
Overrides Sender.removeListener
Defined in node_modules/@types/node/stream.d.ts:118
Parameters:
▪ event: "error"
▪ listener: function
▸ (err
: Error): void
Parameters:
Name | Type |
---|---|
err |
Error |
Returns: this
▸ removeListener(event
: "pause", listener
: function): this
Inherited from Fetcher.removeListener
Overrides Sender.removeListener
Defined in node_modules/@types/node/stream.d.ts:119
Parameters:
▪ event: "pause"
▪ listener: function
▸ (): void
Returns: this
▸ removeListener(event
: "readable", listener
: function): this
Inherited from Fetcher.removeListener
Overrides Sender.removeListener
Defined in node_modules/@types/node/stream.d.ts:120
Parameters:
▪ event: "readable"
▪ listener: function
▸ (): void
Returns: this
▸ removeListener(event
: "resume", listener
: function): this
Inherited from Fetcher.removeListener
Overrides Sender.removeListener
Defined in node_modules/@types/node/stream.d.ts:121
Parameters:
▪ event: "resume"
▪ listener: function
▸ (): void
Returns: this
▸ removeListener(event
: string | symbol, listener
: function): this
Inherited from Fetcher.removeListener
Overrides Sender.removeListener
Defined in node_modules/@types/node/stream.d.ts:122
Parameters:
▪ event: string | symbol
▪ listener: function
▸ (...args
: any[]): void
Parameters:
Name | Type |
---|---|
...args |
any[] |
Returns: this
▸ request(_job?
: any, _peer?
: any): Promise‹any›
Defined in lib/sync/fetcher/fetcher.ts:290
Request results from peer for the given job. Resolves with the raw result.
Parameters:
Name | Type |
---|---|
_job? |
any |
_peer? |
any |
Returns: Promise‹any›
▸ resume(): this
Defined in node_modules/@types/node/stream.d.ts:41
Returns: this
▸ setEncoding(encoding
: BufferEncoding): this
Inherited from Fetcher.setEncoding
Defined in node_modules/@types/node/stream.d.ts:39
Parameters:
Name | Type |
---|---|
encoding |
BufferEncoding |
Returns: this
▸ setMaxListeners(n
: number): this
Inherited from Sender.setMaxListeners
Defined in node_modules/@types/node/events.d.ts:68
Parameters:
Name | Type |
---|---|
n |
number |
Returns: this
▸ store(_result?
: any): Promise‹void›
Defined in lib/sync/fetcher/fetcher.ts:328
Store fetch result. Resolves once store operation is complete.
Parameters:
Name | Type |
---|---|
_result? |
any |
Returns: Promise‹void›
▸ success(job
: any, result
: any): void
Defined in lib/sync/fetcher/fetcher.ts:126
handle successful job completion
Parameters:
Name | Type | Description |
---|---|---|
job |
any | successful job |
result |
any | job result |
Returns: void
▸ tasks(): object[]
Defined in lib/sync/fetcher/fetcher.ts:80
Generate list of tasks to fetch
Returns: object[]
tasks
▸ unpipe(destination?
: NodeJS.WritableStream): this
Defined in node_modules/@types/node/stream.d.ts:43
Parameters:
Name | Type |
---|---|
destination? |
NodeJS.WritableStream |
Returns: this
▸ unshift(chunk
: any, encoding?
: BufferEncoding): void
Inherited from Fetcher.unshift
Defined in node_modules/@types/node/stream.d.ts:44
Parameters:
Name | Type |
---|---|
chunk |
any |
encoding? |
BufferEncoding |
Returns: void
▸ wait(delay?
: undefined | number): Promise‹void›
Defined in lib/sync/fetcher/fetcher.ts:332
Parameters:
Name | Type |
---|---|
delay? |
undefined | number |
Returns: Promise‹void›
▸ wrap(oldStream
: ReadableStream): this
Defined in node_modules/@types/node/stream.d.ts:45
Parameters:
Name | Type |
---|---|
oldStream |
ReadableStream |
Returns: this
▸ write(): void
Defined in lib/sync/fetcher/fetcher.ts:211
Setup writer pipe and start writing fetch results. A pipe is used in order to support backpressure from storing results.
Returns: void
▸ from(iterable
: Iterable‹any› | AsyncIterable‹any›, options?
: ReadableOptions): Readable
Defined in node_modules/@types/node/stream.d.ts:26
A utility method for creating Readable Streams out of iterators.
Parameters:
Name | Type |
---|---|
iterable |
Iterable‹any› | AsyncIterable‹any› |
options? |
ReadableOptions |
Returns: Readable