Setu-TS
    Preparing search index...

    Interface ConsulDiscoveryOptions

    The 'consul' arm.

    0.2.0

    interface ConsulDiscoveryOptions {
        address: string;
        cacheTtlMs?: number;
        datacenter?: string;
        ejection?: false | EjectionOptions;
        http?: IDiscoveryHttp;
        provider: "consul";
        secure?: boolean;
        selfRegistration?: SelfRegistration;
        strategy?: LoadBalanceStrategy;
        token?: string;
        waitSeconds?: number;
    }

    Hierarchy

    • CommonDiscoveryOptions
      • ConsulDiscoveryOptions
    Index
    address: string

    Base URL of the Consul agent, e.g. http://127.0.0.1:8500.

    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.

    datacenter?: string

    Datacenter, sent as ?dc=.

    ejection?: false | EjectionOptions

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

    Overrides the default fetch-backed HTTP seam.

    provider: "consul"

    Discriminant.

    secure?: boolean

    Whether resolved instances speak TLS — Consul carries no scheme.

    selfRegistration?: SelfRegistration

    Advertise this instance to the backend (Consul only).

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

    token?: string

    ACL token, sent as X-Consul-Token.

    waitSeconds?: number

    Blocking-query wait, in seconds. Default 30, clamped to Consul's documented maximum of 600.