iya-sts
    Preparing search index...

    Class export=

    Asks the store a question synchronously, through a worker thread with a connection of its own (#349).

    Index
    • Keeps the options; the thread starts at the first question.

      Parameters

      • options: SyncQueryOptions

        the connection, the bound, and a test backend

      Returns export=

      an Error when the bound is not a function

    • Asks a named question and waits for the answer.

      Parameters

      • name: string

        one of persistence/directory_queries.js's queries (or whatever a test backend answers)

      • args: unknown[]

        its arguments

      Returns unknown

      the answer

      an Error marked STS-LDAP-0130 when no answer came within the bound, STS-LDAP-0131 when the store refused the question, or STS-LDAP-0175 when this request's budget is already spent

    • The bridge's figures since the process started.

      Returns SyncQueryStats

      started threads, questions, timeouts, failures and wait times

    • Ends the thread, for a clean stop and for tests.

      Returns Promise<void>

      a promise that settles when the thread has gone

    • Whether a budget is in force here: an open slot (for tests and for a reader of the logs).

      Returns boolean

      true inside a request's open budget

    • Runs fn with no request's budget, whatever context it was called from: a background entry point arms its timer through this, so the work the timer runs never inherits a console request's slot.

      Type Parameters

      • T

      Parameters

      • fn: () => T

        the work

      Returns T

      whatever fn returns

    • Runs fn with a budget on the synchronous waits query() does inside it (#359). A non-positive or non-finite budget runs fn with none. The wait is cumulative across every question in the call, including one a timeout cut short. When lifetime is given (the request's response), the budget ends at its finish or close: anything fn started that is still running afterwards asks with no budget.

      Parameters

      • ms: number

        the budget, in milliseconds

      • fn: () => unknown

        the work

      • Optionallifetime: BudgetLifetime

        what ends the budget, or none

      Returns unknown

      whatever fn returns