v2.1.0
Makes available a robust poller for experiment configurations via a new method, fetchFlagConfigurations()
. Upstream SDKs can use this method to retrieve the initial configuration and also to kick off regular polling.
When using this poller, there are several configuration options:
Required if using:
apiKey
- Eppo-provided API keysdkName
- name of the SDK requesting the configurationsdkVersion
- semantic version number of the SDK requesting the configuration
** Optional:**
baseUrl
- full URL from which configurations will be fetched. (Default:https://fscdn.eppo.cloud/api
)requestTimeoutMs
- Timeout in milliseconds for the HTTPS request for the experiment configuration. (Default:5000
)numInitialRequestRetries
- Number of additional times the initial configuration request will be attempted if it fails. This is the request typically synchronously waited (via await) for completion. A small wait will be done between requests. (Default:1
)pollAfterSuccessfulInitialization
Poll for new configurations (every 30 seconds) after successfully requesting the initial configuration. - (Default:false
)pollAfterFailedInitialization
- Poll for new configurations even if the initial configuration request failed. (Default:false
)throwOnFailedInitialization
- Throw an error if unable to fetch an initial configuration during initialization. - (Default:false
)numPollRequestRetries
- Number of additional times polling for updated configurations will be attempted before giving up. Polling is done after a successful initial request. Subsequent attempts are done using an exponential backoff. (Default:7
)