Pular para o conteúdo
Português (BR)

AutoDiscoverySettings

Este conteúdo não está disponível em sua língua ainda.

Defined in: src/discovery/autoDiscovery.ts:39

Env-driven defaults for the standard production deployment shapes. Recognised environment variables (none required — every layer is optional, the helper returns whatever providers the env supports):

  • CLUSTER_SEEDS — comma-separated [system@]host:port list. Strongest signal; if present, the ConfigSeedProvider is preferred over the service-discovery layers.
  • CLUSTER_SERVICE_NAME — name of the service whose members are this cluster’s peers. Drives both the KubernetesApiSeedProvider (when running in-pod) and the DnsSeedProvider.
  • CLUSTER_NAMESPACE — K8s namespace. Default: default.
  • KUBERNETES_SERVICE_HOST — set automatically inside every K8s pod; used as the detection signal for adding the K8s-API provider to the chain.

Chain order (first non-empty wins):

  1. CLUSTER_SEEDS (ConfigSeedProvider) — most explicit
  2. K8s API endpoints — service mesh
  3. DNS resolve of CLUSTER_SERVICE_NAME — fallback

If none of the env vars are set, the returned provider’s lookup() resolves to [] — the cluster boots as the first node in a single-node topology, which is exactly what local dev wants.

readonly optional env?: Record<string, string | undefined>

Defined in: src/discovery/autoDiscovery.ts:49

Optional pre-mapped env lookup — useful for tests that want to exercise the provider chain without mutating process.env. Defaults to process.env at call time.


readonly optional log?: (msg, err?) => void

Defined in: src/discovery/autoDiscovery.ts:51

Logger for individual provider failures. Default: no-op.

string

unknown

void


readonly port: number

Defined in: src/discovery/autoDiscovery.ts:43

Cluster remoting port to pair each discovered IP with.


readonly systemName: string

Defined in: src/discovery/autoDiscovery.ts:41

ActorSystem name to stamp on discovered NodeAddresses.