-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathrefreshOptions.ts
More file actions
45 lines (38 loc) · 1.75 KB
/
refreshOptions.ts
File metadata and controls
45 lines (38 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
import { WatchedSetting } from "../WatchedSetting.js";
export const DEFAULT_REFRESH_INTERVAL_IN_MS = 30 * 1000;
export const MIN_REFRESH_INTERVAL_IN_MS = 1 * 1000;
export interface RefreshOptions {
/**
* Specifies whether the provider should automatically refresh when the configuration is changed.
*/
enabled: boolean;
/**
* Specifies the minimum time that must elapse before checking the server for any new changes.
* Default value is 30 seconds. Must be greater than 1 second.
* Any refresh operation triggered will not update the value for a key until after the interval.
*/
refreshIntervalInMs?: number;
/**
* One or more configuration settings to be watched for changes on the server.
* Any modifications to watched settings will refresh all settings loaded by the configuration provider when refresh() is called.
*
* @remarks
* The watched settings will not be loaded to the configuration provider unless being specified in the @see AzureAppConfigurationOptions.selectors
* If no watched setting is specified, all configuration settings will be watched.
*/
watchedSettings?: WatchedSetting[];
}
export interface FeatureFlagRefreshOptions {
/**
* Specifies whether the provider should automatically refresh all feature flags if any feature flag changes.
*/
enabled: boolean;
/**
* Specifies the minimum time that must elapse before checking the server for any new changes.
* Default value is 30 seconds. Must be greater than 1 second.
* Any refresh operation triggered will not update the value for a key until after the interval.
*/
refreshIntervalInMs?: number;
}