LaunchDarklyClientShim

A temporary, experimental shim to allow iOS consumers of Monarch to wire their own LDClient as a data store using LaunchDarklyClientShim.asFeatureFlagDataStore. This interface will be removed in future versions of this library when future, first-party support of LaunchDarkly is available.

Functions

Link copied to clipboard
abstract fun boolVariation(forKey: String, default: Boolean): Boolean

Return a Boolean value forKey, or default if no value exists.

Link copied to clipboard
abstract fun doubleVariation(forKey: String, default: Double): Double

Return a Double value forKey, or default if no value exists.

Link copied to clipboard
abstract fun intVariation(forKey: String, default: Int): Int

Return an Int value forKey, or default if no value exists.

Link copied to clipboard
abstract fun observe(key: String, owner: ObserverOwner, handler: () -> Unit)

Register a handler to be invoked when the value associated with key changes, scoped to owner.

Link copied to clipboard
abstract fun stopObserving(owner: ObserverOwner)

Unregister all observers scoped to owner.

Link copied to clipboard
abstract fun stringVariation(forKey: String, default: String): String

Return a String value forKey, or default if no value exists.