Skip to content

Commit

Permalink
add payload to variant
Browse files Browse the repository at this point in the history
  • Loading branch information
bgiori committed Jun 23, 2023
1 parent 2a018eb commit 07d98d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion evaluation-core/src/commonMain/kotlin/EvaluationEngine.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface EvaluationEngine {
): Map<String, EvaluationVariant>
}

class EvaluationEngineImpl(private val log: Logger? = null) : EvaluationEngine {
class EvaluationEngineImpl(private val log: Logger? = DefaultLogger()) : EvaluationEngine {

data class EvaluationTarget(
val context: EvaluationContext,
Expand Down
5 changes: 3 additions & 2 deletions evaluation-core/src/commonMain/kotlin/EvaluationVariant.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ import kotlinx.serialization.UseSerializers
@Serializable
data class EvaluationVariant(
val key: String,
val value: Any?,
val metadata: Map<String, Any?>?,
val value: Any? = null,
val payload: Map<String, Any?>? = null,
val metadata: Map<String, Any?>? = null,
) : Selectable {
override fun select(selector: String): Any? {
return when (selector) {
Expand Down

0 comments on commit 07d98d7

Please sign in to comment.