config adjustment
This commit is contained in:
Родитель
610808fc15
Коммит
0335104813
|
@ -1,3 +1,5 @@
|
|||
import { RegionServerConfig } from '@/modules/multiregion/domain/types'
|
||||
|
||||
export type GetAvailableRegionConfigs = () => Promise<RegionServerConfig[]>
|
||||
export type GetAvailableRegionConfigs = () => Promise<{
|
||||
[key: string]: RegionServerConfig
|
||||
}>
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
// TODO: Need to coordinate w/ Iain on how this is actually gonna work
|
||||
export type RegionServerConfig = {
|
||||
/**
|
||||
* Full Postgres connection URI (e.g. "postgres://user:password@host:port/dbname")
|
||||
*/
|
||||
connectionUri: string
|
||||
/**
|
||||
* Acts as a key, needs to be globally unique
|
||||
*/
|
||||
locale: string
|
||||
postgres: {
|
||||
/**
|
||||
* Full Postgres connection URI (e.g. "postgres://user:password@host:port/dbname")
|
||||
*/
|
||||
connectionUri: string
|
||||
/**
|
||||
* SSL cert, if any
|
||||
*/
|
||||
publicTlsCertificate?: string
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,10 +3,12 @@ import { GetAvailableRegionConfigs } from '@/modules/multiregion/domain/operatio
|
|||
export const getAvailableRegionConfigsFactory =
|
||||
(): GetAvailableRegionConfigs => async () => {
|
||||
// TODO: Hardcoded for now, should be fetched from a config file
|
||||
return [
|
||||
{
|
||||
locale: 'eu',
|
||||
connectionUri: 'postgresql://speckle:speckle@localhost/speckle_eu'
|
||||
return {
|
||||
eu: {
|
||||
postgres: {
|
||||
connectionUri: 'postgresql://speckle:speckle@localhost/speckle_eu',
|
||||
publicTlsCertificate: undefined
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче