Setu-TS
    Preparing search index...

    Interface StaticDiscoveryOptions

    The 'static' arm — a literal instance list, with no backend at all.

    0.2.0

    interface StaticDiscoveryOptions {
        cacheTtlMs?: number;
        ejection?: false | EjectionOptions;
        provider: "static";
        selfRegistration?: SelfRegistration;
        services: Readonly<Record<string, readonly StaticServiceDefinition[]>>;
        strategy?: LoadBalanceStrategy;
        watchIntervalMs?: number;
    }

    Hierarchy

    • CommonDiscoveryOptions
      • StaticDiscoveryOptions
    Index
    cacheTtlMs?: number

    Milliseconds a resolved instance list is served from cache.

    0 disables caching so every resolve hits the backend. A watched service invalidates its own entry on every change, so this is a safety net rather than the primary freshness mechanism.

    ejection?: false | EjectionOptions

    Outlier-ejection tuning, or false to disable ejection entirely.

    provider: "static"

    Discriminant.

    selfRegistration?: SelfRegistration

    Advertise this instance to the backend (Consul only).

    services: Readonly<Record<string, readonly StaticServiceDefinition[]>>

    Service name to its instances. An unknown name resolves to [].

    Default selection strategy; PickOptions.strategy overrides it per call.

    watchIntervalMs?: number

    Milliseconds between watch() polls.

    The list is immutable by construction, so a static watch fires once with it and never again — this exists so the option is uniform across the two poll-based arms, and the static watch reads it only to schedule that first delivery on the next tick.