Skip to content

Interface: FailureLatch

API / @xmachines/play-view / index / FailureLatch

Defined in: packages/play-view/src/failure-latch.ts:174

The record of what a provider reported. See createFailureLatch.

Methods

clear()

clear(): void;

Defined in: packages/play-view/src/failure-latch.ts:191

Forgets the record, so the next failure reports again.

A caller clears it on EVERY emission of a view, the null emission included: a view, then null, then the same view is a real sequence of an actor, and the second failure of that view is a second attempt that the host must hear about. It also clears it on a resolution that works, and on a retry that the host starts — the host asked for that attempt, so it must hear the result.

Returns

void


shouldReport()

shouldReport(
actor,
view,
store
): boolean;

Defined in: packages/play-view/src/failure-latch.ts:181

Answers whether a failure of these three inputs is new, and records it.

Parameters

ParameterType
actorunknown
viewunknown
storeunknown

Returns

boolean

true the first time for one set of inputs, and false for every repeat of the same set. A caller reports only when it returns true.