@launchdarkly/js-server-sdk-common - v2.26.1
    Preparing search index...

    Interface DataSource

    interface DataSource {
        start(
            dataCallback: (basis: boolean, data: any) => void,
            statusCallback: (status: DataSourceState, err?: any) => void,
            selectorGetter?: () => string | undefined,
        ): void;
        stop(): void;
    }

    Implemented by

    Index
    • May be called any number of times, if already started, has no effect

      Parameters

      • dataCallback: (basis: boolean, data: any) => void

        that will be called when data arrives, may be called multiple times.

      • statusCallback: (status: DataSourceState, err?: any) => void

        that will be called when data source state changes or an unrecoverable error has been encountered.

      • OptionalselectorGetter: () => string | undefined

        that can be invoked to provide the FDv2 selector/basis if one exists

      Returns void

    • May be called any number of times, if already stopped, has no effect. Datasource will not make any additional callbacks after stop returns.

      Returns void