View on GitHub

Cadabra

A/B testing library for Java/Kotlin/Android

cadabra-core / com.fo2rist.cadabra / CadabraConfig

CadabraConfig

interface CadabraConfig

Cadabra’s configuration.

Functions

registerExperiment Register experiment. Uses experiment enum name as ID. An experiment can only be used after it’s registered.abstract fun <V> registerExperiment(experiment: KClass<V>): CadabraConfig where V : Variant, V : Enum<V>
abstract fun <V> registerExperiment(experiment: Class<V>): CadabraConfig where V : Variant, V : Enum<V>
startExperiment Register & start experiment. A combination of registerExperiment & startExperiments.abstract fun <V> startExperiment(experiment: KClass<V>, resolver: Resolver<V>): CadabraConfig where V : Variant, V : Enum<V>
abstract fun <V> startExperiment(experiment: Class<V>, resolver: Resolver<V>): CadabraConfig where V : Variant, V : Enum<V>
Register & start experiment with default variant active. The first item of variants enum is the default one. A combination of registerExperiment & startExperiments.abstract fun <V> startExperiment(experiment: KClass<V>): CadabraConfig where V : Variant, V : Enum<V>
startExperiments Start previously registered experiments. Experiments previously started will be reconfigured with a new active variant specified. Experiments with unknown IDs will be ignored.abstract fun startExperiments(config: ExperimentsConfig): Unit
startExperimentsAsync Start previously registered experiment asynchronously. Registers the ExperimentsConfigProvider that can update experiments config at any time. When it provides the new config via provideConfig it works the same way as startExperiments.abstract fun startExperimentsAsync(configProvider: ExperimentsConfigProvider): CadabraConfig