Quantumbraid's picture
download
raw
684 Bytes
'use strict'
const Dispatcher = require('./dispatcher')
const RetryHandler = require('../handler/retry-handler')
class RetryAgent extends Dispatcher {
#agent = null
#options = null
constructor (agent, options = {}) {
super(options)
this.#agent = agent
this.#options = options
}
dispatch (opts, handler) {
const retry = new RetryHandler({
...opts,
retryOptions: this.#options
}, {
dispatch: this.#agent.dispatch.bind(this.#agent),
handler
})
return this.#agent.dispatch(opts, retry)
}
close () {
return this.#agent.close()
}
destroy () {
return this.#agent.destroy()
}
}
module.exports = RetryAgent

Xet Storage Details

Size:
684 Bytes
·
Xet hash:
a299f4c295d4953ea581eace6af3b9ac48952c7d9b50f9411b83fcc70690c259

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.