@dxos/client
    Preparing search index...

    Class DedicatedWorkerClientServices

    Runs services in a dedicated worker, exposed to other tabs. Leader election is used to ensure only a single worker is running.

    Hierarchy

    • Resource
      • DedicatedWorkerClientServices

    Implements

    Index

    Constructors

    Properties

    closed: Event<undefined | Error> = ...

    The connection to the services provider was terminated. This should fire if the services disconnect unexpectedly or during a client reset.

    reconnected: Event<void> = ...

    The underlying service connection was re-established. Fires after all reconnection callbacks have completed.

    Accessors

    • get _ctx(): Context

      Returns Context

    • get _lifecycleState(): LifecycleState

      Returns LifecycleState

    • get isOpen(): boolean

      Returns boolean

    Methods

    • Error handler for errors that are caught by the context. By default, errors are bubbled up to the parent context which is passed to the open method.

      Parameters

      • err: Error

      Returns Promise<void>

    • Opens the resource. If the resource is already open, it does nothing. If the resource is in an error state, it throws an error. If the resource is closed, it waits for it to close and then opens it.

      Parameters

      • Optionalctx: Context

        Context to use for opening the resource. This context will receive errors that are not handled in _catch.

      Returns Promise<DedicatedWorkerClientServices>

    • Waits until the resource is open.

      Returns Promise<void>