Top level manager of flags for the client. LDClient should be using this interface and not any of the specific instances managed by it. Updates from data sources should be directed to the [init] and [upsert] methods of this interface.

Hierarchy

  • FlagManager

Methods

  • Attempts to get a flag by key from the current flags.

    Parameters

    • key: string

    Returns undefined | ItemDescriptor

  • Gets all the current flags.

    Returns {
        [key: string]: ItemDescriptor;
    }

  • Experimental

    Obtain debug override functions that allows plugins to manipulate the outcome of the flags managed by this manager

    This function is experimental and intended for use by LaunchDarkly tools at this time.

    Returns LDDebugOverride

  • Initializes the flag manager with data from a data source. Persistence initialization is handled by FlagPersistence

    Parameters

    Returns Promise<void>

  • Asynchronously load cached values from persistence.

    Parameters

    Returns Promise<boolean>

  • Unregister a flag change callback.

    Parameters

    • callback: FlagsChangeCallback

    Returns void

  • Register a flag change callback.

    Parameters

    • callback: FlagsChangeCallback

    Returns void

  • Updates in-memory storage with the specified flags without a context or persistent storage. Flags set in this way are considered emphemeral and should be replaced as soon as initialization is done.

    Parameters

    Returns void

  • Update in-memory storage with the specified flags, but do not persistent them to cache storage.

    Parameters

    Returns void

  • Attempt to update a flag. If the flag is for the wrong context, or it is of an older version, then an update will not be performed.

    Parameters

    Returns Promise<boolean>

Generated using TypeDoc