chore: improve docs

This commit is contained in:
DarkSky
2023-01-03 21:03:27 +08:00
parent 2ee99a37fb
commit 4b5e209ecc
3 changed files with 7 additions and 11 deletions
+3 -2
View File
@@ -83,7 +83,7 @@ export class DataCenter {
return provider;
}
async setConfig(workspace: string, config: Record<string, any>) {
private async _setConfig(workspace: string, config: Record<string, any>) {
const values = Object.entries(config);
if (values.length) {
const configure = getKVConfigure(workspace);
@@ -101,7 +101,7 @@ export class DataCenter {
if (!this._workspaces.has(workspaceId)) {
this._workspaces.set(
workspaceId,
this.setConfig(workspaceId, config).then(() =>
this._setConfig(workspaceId, config).then(() =>
this._getWorkspace(workspaceId, providerId)
)
);
@@ -122,6 +122,7 @@ export class DataCenter {
}
}
// reload new workspace instance to memory to refresh config
async reload(
workspaceId: string,
config: LoadConfig = {}