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

FailureDetectorOptionsValidator

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

Defined in: src/cluster/FailureDetectorOptions.ts:66

Validates resolved FailureDetectorOptionsType settings — every threshold is a positive duration, and downAfterMs must exceed unreachableAfterMs.

The ordering rule is not cosmetic. FailureDetector.decide tests down before unreachable, both against the time since the last heartbeat, so downAfterMs <= unreachableAfterMs makes the unreachable branch unreachable code: the peer jumps straight from healthy to down, skipping the state that exists to let a transient network blip recover. Nothing used to reject that configuration.

new FailureDetectorOptionsValidator(): FailureDetectorOptionsValidator

Defined in: src/cluster/FailureDetectorOptions.ts:67

FailureDetectorOptionsValidator

OptionsValidator<FailureDetectorOptionsType>.constructor

validate(settings): void

Defined in: src/util/OptionsValidator.ts:75

Check the (merged) settings; throws OptionsError on the first violation. Unset (undefined) fields always pass.

Partial<T>

void

OptionsValidator.validate