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;
    }

  • 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

  • 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