openmixer — generated API reference
    Preparing search index...

    Interface DiscoveryProvider

    The discovery service the server consumes. A typed EventEmitter: start/stop are idempotent; list() returns the current device set synchronously. The concrete Discovery class in @freemixer/discovery implements this; tests use a fake.

    Typed on/off overloads keep node:events' loose (string, fn) signatures from leaking — callers get checked event names and handler types.

    interface DiscoveryProvider {
        list(): readonly DiscoveredDevice[];
        off<E extends keyof DiscoveryEvents>(
            event: E,
            listener: DiscoveryEvents[E],
        ): this;
        on<E extends keyof DiscoveryEvents>(
            event: E,
            listener: DiscoveryEvents[E],
        ): this;
        start(opts?: DiscoveryOptions): void;
        stop(): void;
        unavailable(): readonly ProbeUnavailable[];
    }
    Index
    • Begin scanning (idempotent). Probes that cannot start emit probeError.

      Parameters

      Returns void

    • Stop scanning and tear probes down (idempotent).

      Returns void

    • The probes that could not scan, and why — rebuilt each pass. Empty means every enabled probe genuinely ran, and only then does an empty list mean "nothing is there".

      Required, not optional: a provider that cannot say what it failed to look at forces the caller back into guessing that no devices means no hardware.

      Returns readonly ProbeUnavailable[]