mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-22 20:46:38 +08:00
chore: rename data services
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
export class DataCenter {
|
||||
static async init() {
|
||||
return new DataCenter();
|
||||
}
|
||||
|
||||
private constructor() {
|
||||
// TODO
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import { DataCenter } from './datacenter.js';
|
||||
|
||||
const _initializeDataCenter = () => {
|
||||
let _dataCenterInstance: Promise<DataCenter>;
|
||||
|
||||
return () => {
|
||||
if (!_dataCenterInstance) {
|
||||
_dataCenterInstance = DataCenter.init();
|
||||
}
|
||||
|
||||
return _dataCenterInstance;
|
||||
};
|
||||
};
|
||||
|
||||
export const getDataCenter = _initializeDataCenter();
|
||||
Reference in New Issue
Block a user