FF4k

class FF4k(val features: FeatureStore = InMemoryFeatureStore(), val properties: PropertyStore = InMemoryPropertyStore())(source)

Entry point of the library: evaluates feature flags against a FeatureStore and exposes typed properties.

Constructors

Link copied to clipboard
constructor(features: FeatureStore = InMemoryFeatureStore(), properties: PropertyStore = InMemoryPropertyStore())
constructor(configuration: FF4kConfiguration)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
suspend fun check(id: String, context: Map<String, Any> = emptyMap()): Boolean

Returns true when the feature exists, is enabled, the caller holds one of its permissions (if any) and its strategy (if any) accepts the context. Unknown features are reported as disabled.

Link copied to clipboard
inline suspend fun <T : Any> property(name: String): T?

Returns the value of the property name when it exists and is of type T, otherwise null.