-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add initial documentation. (#263)
- Loading branch information
1 parent
760567d
commit e12068a
Showing
6 changed files
with
123 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
packages/shared/sdk-server/src/api/data/LDMigrationStage.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,46 @@ | ||
/** | ||
* Stage denotes one of six possible stages a technology migration could be a | ||
* part of, progressing through the following order. | ||
* | ||
* Off -> DualWrite -> Shadow -> Live -> RampDown -> Complete | ||
*/ | ||
export enum LDMigrationStage { | ||
/** | ||
* Off - migration hasn't started, "old" is authoritative for reads and writes | ||
*/ | ||
Off = 'off', | ||
|
||
/** | ||
* DualWrite - write to both "old" and "new", "old" is authoritative for reads | ||
*/ | ||
DualWrite = 'dualwrite', | ||
|
||
/** | ||
* Shadow - both "new" and "old" versions run with a preference for "old" | ||
*/ | ||
Shadow = 'shadow', | ||
|
||
/** | ||
* Live - both "new" and "old" versions run with a preference for "new" | ||
*/ | ||
Live = 'live', | ||
|
||
/** | ||
* RampDown - only read from "new", write to "old" and "new" | ||
*/ | ||
RampDown = 'rampdown', | ||
|
||
/** | ||
* Complete - migration is done | ||
*/ | ||
Complete = 'complete', | ||
} | ||
|
||
/** | ||
* Check if the given string is a migration stage. | ||
* @param value The string to check. | ||
* @returns True if the string is a migration stage. | ||
*/ | ||
export function IsMigrationStage(value: string): boolean { | ||
return Object.values(LDMigrationStage).includes(value as LDMigrationStage); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters