ipfsd-ctl
Version:
Spawn IPFS Daemons, JS or Go
50 lines • 1.68 kB
TypeScript
export default Factory;
export type ControllerOptions = import('./types').ControllerOptions;
export type ControllerOptionsOverrides = import('./types').ControllerOptionsOverrides;
export type IPFSOptions = import('./types').IPFSOptions;
export type Controller = import('./types').Controller;
/**
* Factory class to spawn ipfsd controllers
*/
declare class Factory {
/**
*
* @param {ControllerOptions} options
* @param {ControllerOptionsOverrides} overrides - Pre-defined overrides per controller type
*/
constructor(options?: ControllerOptions, overrides?: ControllerOptionsOverrides);
/** @type ControllerOptions */
opts: ControllerOptions;
/** @type ControllerOptionsOverrides */
overrides: ControllerOptionsOverrides;
/** @type {Controller[]} */
controllers: Controller[];
/**
* Utility method to get a temporary directory
* useful in browsers to be able to generate temp
* repos manually
*
* @param {ControllerOptions} [options]
* @returns {Promise<string>}
*/
tmpDir(options?: import("./types").ControllerOptions | undefined): Promise<string>;
/**
* @param {IPFSOptions & { endpoint: string }} options
*/
_spawnRemote(options: IPFSOptions & {
endpoint: string;
}): Promise<ControllerRemote>;
/**
* Spawn an IPFSd Controller
*
* @param {ControllerOptions} options
* @returns {Promise<Controller>}
*/
spawn(options?: ControllerOptions): Promise<Controller>;
/**
* Stop all controllers
*/
clean(): Promise<void>;
}
import ControllerRemote from "./ipfsd-client.js";
//# sourceMappingURL=factory.d.ts.map