FF4kConfiguration
@Serializable
Represents the complete configuration for an FF4k instance.
This data class holds all the settings, feature flags, and properties that define the behavior of FF4k. It can be serialized to and deserialized from JSON, enabling configuration management through external files or resources.
Usage
Configuration can be loaded from JSON files using JsonFF4kConfigurationParser:
val parser = JsonFF4kConfigurationParser()
val config = parser.parseConfigurationResource("ff4k_config.json")Content copied to clipboard
Or created programmatically:
val config = FF4kConfiguration(
settings = FF4kSettings(autoCreate = true),
features = mapOf("my-feature" to Feature(uid = "my-feature", isEnabled = true)),
properties = mapOf("timeout" to intProperty("timeout") { value = 30 })
)Content copied to clipboard