refactor(relay): extract shared relay policy presets across endpoints
This commit is contained in:
@@ -55,6 +55,34 @@ const loadModule = (relativePath, injected = {}) => {
|
||||
error: () => {}
|
||||
},
|
||||
relayGet: defaultRelayGet,
|
||||
RELAY_POLICY_STRICT_LOGIN: {
|
||||
method: "GET",
|
||||
timeoutMs: 5000,
|
||||
maxRetries: 0,
|
||||
retryBaseDelayMs: 0,
|
||||
retryMaxDelayMs: 0
|
||||
},
|
||||
RELAY_POLICY_LOOKUP: {
|
||||
method: "GET",
|
||||
timeoutMs: 6000,
|
||||
maxRetries: 1,
|
||||
retryBaseDelayMs: 100,
|
||||
retryMaxDelayMs: 500
|
||||
},
|
||||
RELAY_POLICY_BOUNDED_READ: {
|
||||
method: "GET",
|
||||
timeoutMs: 8000,
|
||||
maxRetries: 2,
|
||||
retryBaseDelayMs: 150,
|
||||
retryMaxDelayMs: 800
|
||||
},
|
||||
RELAY_POLICY_SEARCH_PAGED: {
|
||||
method: "GET",
|
||||
timeoutMs: 9000,
|
||||
maxRetries: 2,
|
||||
retryBaseDelayMs: 150,
|
||||
retryMaxDelayMs: 1000
|
||||
},
|
||||
...injected
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user