Package-level declarations

Types

Link copied to clipboard
@Serializable
@SerialName(value = "and")
data class AndStrategy(val strategies: List<FlippingStrategy>) : FlippingStrategy
Link copied to clipboard
@Serializable
@SerialName(value = "contextFilter")
data class ContextFilterStrategy(val key: String, val allowed: Set<String>) : FlippingStrategy

Active when the context value under key is one of allowed. Combine with not for a deny list. A missing key evaluates to false.

Link copied to clipboard
@Serializable
@SerialName(value = "dailyHours")
data class DailyHoursStrategy(val startHour: Int, val endHour: Int, val timezone: TimeZone = TimeZone.UTC) : FlippingStrategy

Active every day from startHour (inclusive) until endHour (exclusive) in timezone.

Link copied to clipboard
@Serializable
@SerialName(value = "dateRange")
data class DateRangeStrategy(val start: Instant, val end: Instant) : FlippingStrategy

Active from start (inclusive) until end (exclusive).

Link copied to clipboard
@Serializable
@SerialName(value = "not")
data class NotStrategy(val strategy: FlippingStrategy) : FlippingStrategy
Link copied to clipboard
@Serializable
@SerialName(value = "or")
data class OrStrategy(val strategies: List<FlippingStrategy>) : FlippingStrategy
Link copied to clipboard
@Serializable
@SerialName(value = "percentage")
data class PercentageStrategy(val percentage: Int) : FlippingStrategy

Active for a random percentage of evaluations.

Link copied to clipboard
@Serializable
@SerialName(value = "releaseDate")
data class ReleaseDateStrategy(val releaseDate: Instant) : FlippingStrategy

Active from releaseDate onwards.

Link copied to clipboard
@Serializable
@SerialName(value = "userPercentage")
data class UserPercentageStrategy(val percentage: Int, val key: String = "userId") : FlippingStrategy

Active for a stable percentage of users, bucketed by the context value under key.

Link copied to clipboard
@Serializable
@SerialName(value = "weekday")
data class WeekdayStrategy(val days: Set<DayOfWeek>, val timezone: TimeZone = TimeZone.UTC) : FlippingStrategy

Active on the given days of the week in timezone.

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard