All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dev.openfeature.contrib.providers.flipt.ContextTransformer Maven / Gradle / Ivy

The newest version!
package dev.openfeature.contrib.providers.flipt;

import dev.openfeature.sdk.EvaluationContext;

import java.util.HashMap;
import java.util.Map;

/**
 * Transformer from OpenFeature context to Flipt context.
 */
public class ContextTransformer {

    protected static Map transform(EvaluationContext ctx) {
        Map contextMap = new HashMap<>();
        ctx.asObjectMap().forEach((k, v) -> {
            contextMap.put(k, String.valueOf(v));
        });
        return contextMap;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy