@tikoci/centrs
    Preparing search index...

    Interface DiscoverOptions

    interface DiscoverOptions {
        cdbFile?: string;
        cdbPassword?: string;
        env?: Record<string, string | undefined>;
        group?: string;
        host?: string;
        listen?: (options: ListenMndpOptions) => Promise<ListenMndpResult>;
        now?: () => number;
        onBound?: (port: number) => void;
        port?: number;
        save?: boolean;
        sendRefresh?: boolean;
        signal?: AbortSignal;
        timeoutMs?: number;
        ttlMs?: number;
        writeOptions?: WriteWinBoxCdbOptions;
    }
    Index

    Properties

    cdbFile?: string

    CDB path override for --save.

    cdbPassword?: string

    CDB password for --save against an encrypted CDB.

    env?: Record<string, string | undefined>

    Environment snapshot for CDB resolution.

    group?: string

    CDB group for saved entries. Default discovered.

    host?: string

    Bind address. Default 0.0.0.0.

    listen?: (options: ListenMndpOptions) => Promise<ListenMndpResult>

    Listener injection so discover is testable without a socket.

    now?: () => number

    Clock injection for the cache and provenance timestamps.

    onBound?: (port: number) => void

    Called once with the bound port (test hook).

    port?: number

    UDP port. Default 5678; 0 for an ephemeral test port.

    save?: boolean

    Persist discovered neighbors into the CDB.

    sendRefresh?: boolean

    Send the broadcast refresh. Default true.

    signal?: AbortSignal

    Abort the listen early.

    timeoutMs?: number

    Listen window in ms. Default 15000.

    ttlMs?: number

    Cache TTL in ms.

    writeOptions?: WriteWinBoxCdbOptions

    Write options forwarded to the save path.