UNPKG

@jbrowse/core

Version:

JBrowse 2 core libraries used by plugins

35 lines (34 loc) 2.17 kB
import MainThreadRpcDriver from './MainThreadRpcDriver'; import WebWorkerRpcDriver from './WebWorkerRpcDriver'; import type PluginManager from '../PluginManager'; import type { AnyConfigurationModel } from '../configuration'; type DriverClass = WebWorkerRpcDriver | MainThreadRpcDriver; interface BackendConfigurations { WebWorkerRpcDriver?: Omit<ConstructorParameters<typeof WebWorkerRpcDriver>[0], 'config'>; MainThreadRpcDriver?: Omit<ConstructorParameters<typeof MainThreadRpcDriver>[0], 'config'>; } declare const DriverClasses: { WebWorkerRpcDriver: typeof WebWorkerRpcDriver; MainThreadRpcDriver: typeof MainThreadRpcDriver; }; export default class RpcManager { pluginManager: PluginManager; mainConfiguration: AnyConfigurationModel; backendConfigurations: BackendConfigurations; static configSchema: import("../configuration/configurationSchema").ConfigurationSchemaType<{ defaultDriver: { type: string; description: string; defaultValue: string; }; drivers: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IMapType<import("mobx-state-tree").ITypeUnion<import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<Record<string, any>>> | undefined, import("mobx-state-tree").ModelSnapshotType<Record<string, any>>, ({} & Partial<import("mobx-state-tree/dist/internal").ExtractCFromProps<Record<string, any>>> & import("mobx-state-tree/dist/internal").NonEmptyObject) | undefined>>, [undefined]>; }, import("../configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>; driverObjects: Map<string, DriverClass>; constructor(pluginManager: PluginManager, mainConfiguration: AnyConfigurationModel, backendConfigurations: BackendConfigurations); getDriver(backendName: keyof typeof DriverClasses): DriverClass; getDriverForCall(_sessionId: string, _functionName: string, args: { rpcDriverName?: string; }): Promise<DriverClass>; call(sessionId: string, functionName: string, args: Record<string, unknown>, opts?: {}): Promise<unknown>; } export {};