Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/AzureAppConfigurationImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { AzureAppConfiguration, ConfigurationObjectConstructionOptions } from ".
import { AzureAppConfigurationOptions } from "./AzureAppConfigurationOptions.js";
import { IKeyValueAdapter } from "./IKeyValueAdapter.js";
import { JsonKeyValueAdapter } from "./JsonKeyValueAdapter.js";
import { DEFAULT_REFRESH_INTERVAL_IN_MS, MIN_REFRESH_INTERVAL_IN_MS } from "./RefreshOptions.js";
import { DEFAULT_REFRESH_INTERVAL_IN_MS, MIN_REFRESH_INTERVAL_IN_MS } from "./refresh/refreshOptions.js";
import { Disposable } from "./common/disposable.js";
import { base64Helper, jsonSorter } from "./common/utils.js";
import {
Expand Down
2 changes: 1 addition & 1 deletion src/AzureAppConfigurationOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import { AppConfigurationClientOptions } from "@azure/app-configuration";
import { KeyVaultOptions } from "./keyvault/KeyVaultOptions.js";
import { RefreshOptions } from "./RefreshOptions.js";
import { RefreshOptions } from "./refresh/refreshOptions.js";
import { SettingSelector } from "./types.js";
import { FeatureFlagOptions } from "./featureManagement/FeatureFlagOptions.js";

Expand Down
2 changes: 1 addition & 1 deletion src/featureManagement/FeatureFlagOptions.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import { FeatureFlagRefreshOptions } from "../RefreshOptions.js";
import { FeatureFlagRefreshOptions } from "../refresh/refreshOptions.js";
import { SettingSelector } from "../types.js";

/**
Expand Down
89 changes: 45 additions & 44 deletions src/RefreshOptions.ts → src/refresh/refreshOptions.ts
Original file line number Diff line number Diff line change
@@ -1,44 +1,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
* 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;
}
// 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;
}
Loading