feat: first test for data center

This commit is contained in:
DarkSky
2022-12-28 17:00:51 +08:00
parent 32fce00627
commit df30cc4861
12 changed files with 86 additions and 79 deletions
+19
View File
@@ -0,0 +1,19 @@
class DataCenter {
static async init() {
return new DataCenter();
}
private constructor() {
// TODO
}
}
let _dataCenterInstance: Promise<DataCenter>;
export const getDataCenter = () => {
if (!_dataCenterInstance) {
_dataCenterInstance = DataCenter.init();
}
return _dataCenterInstance;
};
+2
View File
@@ -2,3 +2,5 @@ export { signInWithGoogle, onAuthStateChanged } from './auth';
export * from './request';
export * from './sdks';
export * from './websocket';
export { getDataCenter } from './data-center';