-
Notifications
You must be signed in to change notification settings - Fork 39
Mob 10947 retry policy android #719
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: MOB-10946-TS-Layer
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ import { | |
|
||
import { Route } from '../constants/routes'; | ||
import type { RootStackParamList } from '../types/navigation'; | ||
import type { IterableAuthFailure } from '../../../src/core'; | ||
import { type IterableAuthFailure, IterableRetryBackoffType } from '../../../src/core'; | ||
|
||
type Navigation = StackNavigationProp<RootStackParamList>; | ||
|
||
|
@@ -148,6 +148,12 @@ export const IterableAppProvider: FunctionComponent< | |
|
||
config.logLevel = IterableLogLevel.debug; | ||
|
||
config.retryPolicy = { | ||
maxRetry: 5, | ||
retryInterval: 10, | ||
retryBackoff: IterableRetryBackoffType.LINEAR | ||
lposen marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
config.inAppHandler = () => IterableInAppShowResponse.show; | ||
|
||
config.authHandler = () => { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
* Enum representing the type of backoff pattern to apply between retry attempts. | ||
*/ | ||
export enum IterableRetryBackoffType { | ||
LINEAR = 'LINEAR', | ||
EXPONENTIAL = 'EXPONENTIAL', | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ export * from './IterableDataRegion'; | |
export * from './IterableEventName'; | ||
export * from './IterableLogLevel'; | ||
export * from './IterablePushPlatform'; | ||
export * from './IterableRetryBackoffType'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { IterableRetryBackoffType } from '../enums/IterableRetryBackoffType'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
/** | ||
* Configuration class for JWT refresh retry behavior. | ||
* Maps to the native RetryPolicy class in Android/iOS SDKs. | ||
*/ | ||
export interface IterableRetryPolicy { | ||
/** Number of consecutive JWT refresh retries the SDK should attempt */ | ||
maxRetry: number; | ||
/** | ||
* Duration between JWT refresh retries in seconds | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
* (starting point for retry backoff) | ||
*/ | ||
retryInterval: number; | ||
/** The backoff pattern to apply between retry attempts */ | ||
retryBackoff: IterableRetryBackoffType; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './IterableEdgeInsetDetails'; | ||
export * from './IterableAuthFailure'; | ||
export * from './IterableRetryPolicy'; |
Uh oh!
There was an error while loading. Please reload this page.