interface ICfgSyncConfig {
    blkCdnCfg?: boolean;
    cfgUrl?: string;
    customEvtName?: string;
    nonOverrideConfigs?: NonOverrideCfg<IConfiguration & IConfig>;
    onCfgChangeReceive?: ((event?: ICfgSyncEvent) => void);
    overrideFetchFn?: SendGetFunction;
    overrideSyncFn?: ((config?: IConfiguration & IConfig, customDetails?: any) => boolean);
    scheduleFetchTimeout?: number;
    syncMode?: ICfgSyncMode;
}

Properties

blkCdnCfg?: boolean

Determines if fetching the CDN endpoint should be blocked or not.

false
cfgUrl?: string

CDN endpoint for fetching configuration. If cfgUrl is defined, instance will NOT listen to core configuration changes.

null
customEvtName?: string

Event name for sending or listening to configuration change details

ai_cfgsync
nonOverrideConfigs?: NonOverrideCfg<IConfiguration & IConfig>

When current instance is set with syncMode: Receive, config fields under nonOverrideConfigs will NOT be changed by any config details sent out from other instances. NOTE: this config will be ONLY applied during initialization, so it won't be changed dynamically

{instrumentationKey:true,connectionString:true,endpointUrl:true}
onCfgChangeReceive?: ((event?: ICfgSyncEvent) => void)

Overrides callback function to handle event details when changes are received via event listener.

null
overrideFetchFn?: SendGetFunction

Overrides fetch function to get config from cfgUrl when cfgUrl is defined.

null
overrideSyncFn?: ((config?: IConfiguration & IConfig, customDetails?: any) => boolean)

Overrides sync() function to broadcast changes.

null
scheduleFetchTimeout?: number

Identifies the time interval (in milliseconds) for fetching config details from cfgUrl when cfgUrl is defined. Default to 30 mins, 30601000ms. If set to 0, the fetch operation will only be called once during initialization.

30mins (30*60*1000ms)
syncMode?: ICfgSyncMode

Identifies whether instance should receive or broadcast config changes

Broadcast