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

cloud.prefab.client.LiveValuesConfigClient Maven / Gradle / Ivy

Go to download

API Client for https://prefab.cloud: rate limits, feature flags and semaphores as a service

There is a newer version: 0.3.23
Show newest version
package cloud.prefab.client;

import cloud.prefab.client.value.Value;
import cloud.prefab.context.ContextStore;
import cloud.prefab.context.PrefabContext;
import java.time.Duration;
import java.util.List;

public interface LiveValuesConfigClient {
  /**
   * Evaluates a configuration based on context from the ContextStore
   * ie set via {@link ContextStore#addContext(PrefabContext) addContext}
   * @param key name of the config to evaluate
   * @return a value that will be evaluated at runtime based on the context from the current scope
   */
  Value liveString(String key);

  /**
   * Evaluates a configuration based on context from the ContextStore
   * ie set via {@link ContextStore#addContext(PrefabContext) addContext}
   * @param key name of the config to evaluate
   * @return a value that will be evaluated at runtime based on the context from the current scope
   */
  Value> liveStringList(String key);

  /**
   * Evaluates a configuration based on context from the ContextStore
   * ie set via {@link ContextStore#addContext(PrefabContext) addContext}
   * @param key name of the config to evaluate
   * @return a value that will be evaluated at runtime based on the context from the current scope
   */
  Value liveBoolean(String key);

  /**
   * Evaluates a configuration based on context from the ContextStore
   * ie set via {@link ContextStore#addContext(PrefabContext) addContext}
   * @param key name of the config to evaluate
   * @return a value that will be evaluated at runtime based on the context from the current scope
   */
  Value liveLong(String key);

  /**
   * Evaluates a configuration based on context from the ContextStore
   * ie set via {@link ContextStore#addContext(PrefabContext) addContext}
   * @param key name of the config to evaluate
   * @return a value that will be evaluated at runtime based on the context from the current scope
   */
  Value liveDouble(String key);

  /**
   * Evaluates a configuration based on context from the ContextStore
   * ie set via {@link ContextStore#addContext(PrefabContext) addContext}
   * @param key name of the config to evaluate
   * @return a Duration value that will be evaluated at runtime based on the context from the current scope
   */
  Value liveDuration(String key);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy