@neo-one/server
Version:
NEO•ONE Server that NEO•ONE CLI and other clients connect to.
47 lines (46 loc) • 1.71 kB
TypeScript
import { Monitor } from '@neo-one/monitor';
import { AllResources, Binary, DescribeTable, Plugin } from '@neo-one/server-plugin';
import { Observable, ReplaySubject } from 'rxjs';
import { PortAllocator } from './PortAllocator';
import { ResourcesManager } from './ResourcesManager';
interface Plugins {
[plugin: string]: Plugin;
}
export declare class PluginManager {
readonly httpServerPort: number;
readonly allResources$: Observable<AllResources>;
mutablePlugins: Plugins;
readonly plugins$: ReplaySubject<string>;
private readonly monitor;
private readonly binary;
private readonly portAllocator;
private readonly dataPath;
private readonly mutableResourceManagers;
private readonly ready;
private readonly update$;
constructor({ monitor, binary, portAllocator, dataPath, httpServerPort, }: {
readonly monitor: Monitor;
readonly binary: Binary;
readonly portAllocator: PortAllocator;
readonly dataPath: string;
readonly httpServerPort: number;
});
readonly plugins: readonly string[];
init(): Promise<void>;
reset(): Promise<void>;
registerPlugins(pluginNames: readonly string[]): Promise<void>;
getPlugin({ plugin: pluginName }: {
readonly plugin: string;
}): Plugin;
getResourcesManager({ plugin: pluginName, resourceType: resourceTypeName, }: {
readonly plugin: string;
readonly resourceType: string;
}): ResourcesManager;
getDebug(): DescribeTable;
private registerPlugin;
private getResourcesManagerDataPath;
private getMasterResourceAdapterDataPath;
private getPluginPath;
private getResourcesManagersDebug;
}
export {};