Skip to content

Commit

Permalink
fixing edge feature stores
Browse files Browse the repository at this point in the history
  • Loading branch information
tanderson-ld committed Jan 9, 2025
1 parent da52f3c commit 35a565c
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,15 @@ export class EdgeFeatureStore implements LDFeatureStore {
}

init(allData: LDFeatureStoreDataStorage, callback: () => void): void {
this.applyChanges(true, allData, undefined, callback);
}

applyChanges(
basis: boolean,
data: LDFeatureStoreDataStorage,
selector: String | undefined,
callback: () => void,
): void {
callback();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export class EdgeFeatureStore implements LDFeatureStore {
}

init(allData: LDFeatureStoreDataStorage, callback: () => void): void {
callback();
this.applyChanges(true, allData, undefined, callback);
}

applyChanges(
Expand Down
2 changes: 2 additions & 0 deletions packages/shared/sdk-server/src/options/Configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ const validations: Record<string, TypeValidator> = {
hooks: TypeValidators.createTypeArray('Hook[]', {}),
};


Check failure on line 62 in packages/shared/sdk-server/src/options/Configuration.ts

View workflow job for this annotation

GitHub Actions / build-test-sdk-server

Delete `⏎⏎`

/**
* @internal
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ export default class DynamoDBFeatureStore implements LDFeatureStore {
this._wrapper.upsert(kind, data, callback);
}

applyChanges(
basis: boolean,
data: LDFeatureStoreDataStorage,
selector: String | undefined,
callback: () => void,
): void {
this._wrapper.applyChanges(basis, data, selector, callback);
}

initialized(callback: (isInitialized: boolean) => void): void {
this._wrapper.initialized(callback);
}
Expand Down
9 changes: 9 additions & 0 deletions packages/store/node-server-sdk-redis/src/RedisFeatureStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ export default class RedisFeatureStore implements LDFeatureStore {
this._wrapper.upsert(kind, data, callback);
}

applyChanges(
basis: boolean,
data: LDFeatureStoreDataStorage,
selector: String | undefined,
callback: () => void,
): void {
this._wrapper.applyChanges(basis, data, selector, callback);
}

initialized(callback: (isInitialized: boolean) => void): void {
this._wrapper.initialized(callback);
}
Expand Down

0 comments on commit 35a565c

Please sign in to comment.