A client for the FeatureProbe API. Applications should instantiate a single FeatureProbe for the lifetime of their application.

Hierarchy

  • FeatureProbe

Constructors

Properties

_eventRecorder: EventRecorder
_eventsUrl: string
_logger: Logger<LoggerOptions>
_prerequisiteMaxDeep: number
_realtimeUrl: string
_refreshInterval: number
_remoteUrl: string
_repository: Repository
_serverSdkKey: string
_toggleSyncer: Synchronizer
_togglesUrl: string

Accessors

Methods

  • Gets the detailed evaluation results of a boolean toggle.

    Parameters

    • key: string

      toggle key

    • user: FPUser

      user to be evaluated

    • defaultValue: boolean

      default return value

    Returns FPToggleDetail

  • Gets the evaluated value of a boolean toggle.

    Parameters

    • key: string

      toggle key

    • user: FPUser

      user to be evaluated

    • defaultValue: boolean

      default return value

    Returns boolean

  • Closes the FeatureProbe client, this would properly clean the memory and report all events.

    Returns Promise<void>

  • Gets the detailed evaluation results of a json toggle.

    Parameters

    • key: string

      toggle key

    • user: FPUser

      user to be evaluated

    • defaultValue: object

      default return value

    Returns FPToggleDetail

  • Gets the evaluated value of a json toggle.

    Parameters

    • key: string

      toggle key

    • user: FPUser

      user to be evaluated

    • defaultValue: any

      default return value

    Returns any

  • Gets the detailed evaluation results of a number toggle.

    Parameters

    • key: string

      toggle key

    • user: FPUser

      user to be evaluated

    • defaultValue: number

      default return value

    Returns FPToggleDetail

  • Gets the evaluated value of a number toggle.

    Parameters

    • key: string

      toggle key

    • user: FPUser

      user to be evaluated

    • defaultValue: number

      default return value

    Returns number

  • Initializes the toggle repository.

    Parameters

    • Optional startWait: number

      set time limit for initialization, if not set, this function won't be timeout

    Returns Promise<void>

  • Gets the detailed evaluation results of a string toggle.

    Parameters

    • key: string

      toggle key

    • user: FPUser

      user to be evaluated

    • defaultValue: string

      default return value

    Returns FPToggleDetail

  • Gets the evaluated value of a string toggle.

    Parameters

    • key: string

      toggle key

    • user: FPUser

      user to be evaluated

    • defaultValue: string

      default return value

    Returns string

  • Record custom events, value is optional.

    Parameters

    • name: string
    • user: FPUser
    • Optional value: unknown

    Returns void

Generated using TypeDoc