File tree Expand file tree Collapse file tree 3 files changed +7
-0
lines changed
packages/cubejs-server-core/src/core Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ const schemaOptions = Joi.object().keys({
7474 contextToAppId : Joi . func ( ) ,
7575 contextToRoles : Joi . func ( ) ,
7676 contextToOrchestratorId : Joi . func ( ) ,
77+ contextToCubeStoreRouterId : Joi . func ( ) ,
7778 contextToDataSourceId : Joi . func ( ) ,
7879 contextToApiScopes : Joi . func ( ) ,
7980 repositoryFactory : Joi . func ( ) ,
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ import type {
5959 LoggerFn ,
6060 DriverConfig ,
6161 ScheduledRefreshTimeZonesFn ,
62+ ContextToCubeStoreRouterIdFn ,
6263} from './types' ;
6364import {
6465 ContextToOrchestratorIdFn ,
@@ -137,6 +138,8 @@ export class CubejsServerCore {
137138
138139 protected readonly contextToOrchestratorId : ContextToOrchestratorIdFn ;
139140
141+ protected readonly contextToCubeStoreRouterId : ContextToCubeStoreRouterIdFn | null ;
142+
140143 protected readonly preAggregationsSchema : PreAggregationsSchemaFn ;
141144
142145 protected readonly scheduledRefreshTimeZones : ScheduledRefreshTimeZonesFn ;
@@ -216,6 +219,7 @@ export class CubejsServerCore {
216219 }
217220
218221 this . contextToOrchestratorId = this . options . contextToOrchestratorId || ( ( ) => 'STANDALONE' ) ;
222+ this . contextToCubeStoreRouterId = this . options . contextToCubeStoreRouterId ;
219223
220224 // proactively free up old cache values occasionally
221225 if ( this . options . maxCompilerCacheKeepAlive ) {
Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ export type DatabaseType =
123123export type ContextToAppIdFn = ( context : RequestContext ) => string | Promise < string > ;
124124export type ContextToRolesFn = ( context : RequestContext ) => string [ ] | Promise < string [ ] > ;
125125export type ContextToOrchestratorIdFn = ( context : RequestContext ) => string | Promise < string > ;
126+ export type ContextToCubeStoreRouterIdFn = ( context : RequestContext ) => string | Promise < string > ;
126127
127128export type OrchestratorOptionsFn = ( context : RequestContext ) => OrchestratorOptions | Promise < OrchestratorOptions > ;
128129
@@ -190,6 +191,7 @@ export interface CreateOptions {
190191 contextToAppId ?: ContextToAppIdFn ;
191192 contextToRoles ?: ContextToRolesFn ;
192193 contextToOrchestratorId ?: ContextToOrchestratorIdFn ;
194+ contextToCubeStoreRouterId ?: ContextToCubeStoreRouterIdFn ;
193195 contextToApiScopes ?: ContextToApiScopesFn ;
194196 repositoryFactory ?: ( context : RequestContext ) => SchemaFileRepository ;
195197 checkAuth ?: CheckAuthFn ;
You can’t perform that action at this time.
0 commit comments