-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Add RN SDK offline support through ConnectionMode. (#361)
This adds offline support for the RN SDK through ConnectionMode. ```tsx /** * Sets the mode to use for connections when the SDK is initialized. * * Defaults to streaming. */ initialConnectionMode?: ConnectionMode; // in api/LDOptions.ts /** * Sets the SDK connection mode. * * @param mode - One of supported {@link ConnectionMode}. By default, the SDK uses 'streaming'. */ setConnectionMode(mode: ConnectionMode): void; // in api/LDClient.ts ```
- Loading branch information
Showing
14 changed files
with
186 additions
and
66 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* The connection mode for the SDK to use. | ||
* | ||
* @remarks | ||
* | ||
* The following connection modes are supported: | ||
* | ||
* offline - When the SDK is set offline it will stop receiving updates and will stop sending | ||
* analytic and diagnostic events. | ||
* | ||
* streaming - The SDK will use a streaming connection to receive updates from LaunchDarkly. | ||
*/ | ||
type ConnectionMode = 'offline' | 'streaming'; | ||
|
||
export default ConnectionMode; |
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
Oops, something went wrong.