import { ConfigApis } from '../../../api'; import { HttpProtocol } from '../../../types/http'; import { Result } from '../../../types/types'; import { Task } from '../queue'; import { QueueContext } from '../context'; export declare class Host { private host; private protocol; constructor(host: string, protocol: HttpProtocol); /** * @description 当前 host 是否为冻结状态 */ isFrozen(): boolean; /** * @param {number} time 单位秒,默认 20s * @description 冻结该 host 对象,该 host 将在指定时间内不可用 */ freeze(time?: number): void; /** * @description 解冻该 host */ unfreeze(): void; /** * @description 获取当前 host 的完整 url */ getUrl(): string; /** * @description 获取解冻时间 */ getUnfreezeTime(): number | undefined; } export declare type HostProgressKey = 'prepareUploadHost'; export declare class HostProvideTask implements Task { private context; private hostProvider; constructor(context: QueueContext, configApis: ConfigApis, protocol: HttpProtocol, initHosts?: string[]); cancel(): Promise; process(notice: () => void): Promise; }