SettingsAPI interface

An interface representing settings related APIs

Methods

get()

The workload app can use this API to get its settings, such as feature switches, locale, etc. Some of these settings might be dynamic as users may switch to a different language without refreshing the app. Another API, settings.onChange(), is available to notify the workload app whenever any of these settings are changed.

onChange((settings: WorkloadSettings) => void)

Registers a callback function to be notified whenever any settings are changed.

Method Details

get()

The workload app can use this API to get its settings, such as feature switches, locale, etc. Some of these settings might be dynamic as users may switch to a different language without refreshing the app. Another API, settings.onChange(), is available to notify the workload app whenever any of these settings are changed.

function get(): Promise<WorkloadSettings>

Returns

Promise<WorkloadSettings>

A promise which resolves when the settings is fetched.

onChange((settings: WorkloadSettings) => void)

Registers a callback function to be notified whenever any settings are changed.

function onChange(callback: (settings: WorkloadSettings) => void)

Parameters

callback

(settings: WorkloadSettings) => void

The callback function invoked when any workload settings are changed