LocalEvaluationConfig: {
    assignmentConfig?: AssignmentConfig;
    bootstrap?: Record<string, FlagConfig>;
    cohortSyncConfig?: CohortSyncConfig;
    debug?: boolean;
    flagConfigPollingIntervalMillis?: number;
    httpAgent?: https.Agent;
    serverUrl?: string;
    serverZone?: "us" | "eu";
    streamFlagConnTimeoutMillis?: number;
    streamServerUrl?: string;
    streamUpdates?: boolean;
}

Configuration for the LocalEvaluationClient

Type declaration

  • Optional assignmentConfig?: AssignmentConfig

    Configuration for automatically tracking assignment events after an evaluation.

  • Optional bootstrap?: Record<string, FlagConfig>

    Bootstrap the client with a pre-fetched flag configurations.

    Useful if you are managing the flag configurations separately.

  • Optional cohortSyncConfig?: CohortSyncConfig
  • Optional debug?: boolean

    Set to true to log some extra information to the console.

  • Optional flagConfigPollingIntervalMillis?: number

    The interval in milliseconds to poll the amplitude server for flag config updates. These rules stored in memory and used when calling evaluate() to perform local evaluation.

    Default: 30000 (30 seconds)

  • Optional httpAgent?: https.Agent

    The agent used to send http requests.

  • Optional serverUrl?: string

    The server endpoint from which to request flags. For hitting the EU data center, use serverZone. Setting this value will override serverZone defaults.

  • Optional serverZone?: "us" | "eu"

    Select the Amplitude data center to get flags and variants from, us or eu.

  • Optional streamFlagConnTimeoutMillis?: number

    To use with streaming. The timeout for a single attempt of establishing a valid stream of flag configs. The time starts at making request and ends when received the initial flag configs.

  • Optional streamServerUrl?: string

    The stream server endpoint from which to stream data.

  • Optional streamUpdates?: boolean

    To use streaming API or polling. With streaming, flag config updates are received immediately, no polling is necessary. If stream fails for any reason, it will fallback to polling automatically. Default will be false, using poller.