@jbrowse/core
Version:
JBrowse 2 core libraries used by plugins
23 lines (22 loc) • 958 B
JavaScript
import { types } from '@jbrowse/mobx-state-tree';
import MainThreadRpcDriverConfigSchema from "./mainThreadRpcConfig.js";
import WebWorkerRpcDriverConfigSchema from "./webWorkerRpcConfig.js";
import { ConfigurationSchema } from "../configuration/index.js";
function x() { }
export default ConfigurationSchema('RpcOptions', {
defaultDriver: {
type: 'string',
description: 'the RPC driver to use for tracks and tasks that are not configured to use a specific RPC backend',
defaultValue: 'MainThreadRpcDriver',
},
drivers: types.optional(types.map(types.union(MainThreadRpcDriverConfigSchema, WebWorkerRpcDriverConfigSchema)), {
MainThreadRpcDriver: { type: 'MainThreadRpcDriver' },
WebWorkerRpcDriver: { type: 'WebWorkerRpcDriver' },
}),
}, {
actions: (self) => ({
addDriverConfig(configName, configSnapshot) {
self.drivers.set(configName, configSnapshot);
},
}),
});