@launchdarkly/js-client-sdk-common - v1.35.0
    Preparing search index...

    Interface EventSourceRetryDelayStrategy

    The strategy an EventSource uses to decide how long to wait before each reconnection attempt. It is injected so a data source can drive reconnection timing from its own retry state rather than the transport's built-in backoff. The nowMs arguments are the transport's wall clock; an implementation that keeps its own clock may ignore them.

    interface EventSourceRetryDelayStrategy {
        nextRetryDelay(nowMs: number): number;
        setBaseDelay(baseDelayMs: number): void;
        setGoodSince(nowMs: number): void;
    }
    Index
    • Returns the delay, in milliseconds, before the next reconnection.

      Parameters

      • nowMs: number

      Returns number

    • Applies a server-directed base delay, in milliseconds.

      Parameters

      • baseDelayMs: number

      Returns void

    • Records that the connection is currently healthy.

      Parameters

      • nowMs: number

      Returns void