LocalEvaluationConfig: {
    assignmentConfig?: AssignmentConfig;
    bootstrap?: Record<string, FlagConfig>;
    debug?: boolean;
    flagConfigPollingIntervalMillis?: number;
    httpAgent?: https.Agent;
    serverUrl?: string;
    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 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 variants.

  • 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.