Cotal TypeScript packages
    Preparing search index...

    Function pinnedLivenessProbe

    • THE §13.5 LIVENESS HOOK the caller hands to a scatter, and the record of what it established.

      It is built HERE and not in core because it is entirely a statement about this caller's CREDENTIAL. A probe publishes on an instance's own rail, and only the layer that minted the credential knows which instance rails it carries; core cannot know, and a core that guessed would publish requests the broker must refuse — invisibly, since a refused publish looks exactly like a slow instance from the caller's side.

      TWO RULES, and both are about not asking questions this credential cannot ask:

      • an id OUTSIDE the pinned set gets unknown WITHOUT PUBLISHING. The scatter re-freezes the class on its own connection, so it can name an instance that registered after the freeze this credential was minted against. That instance is NEW, not dead, and the right answer for it is the deadline — reached without sending a request that would be refused.
      • an id INSIDE the set that the broker refuses anyway settles IMMEDIATELY on the violation rather than expiring into unknown at the budget, and is reported by name.

      Only gone ever licenses anything downstream, so every mistake this can make is a slower and more truthful answer, never a faster wrong one.

      Parameters

      • nc: NatsConnection
      • opts: {
            caller: EpCaller;
            endpoint: string;
            pinned: ReadonlySet<string>;
            probeDeadlineMs?: number;
            report?: (line: string) => void;
            space: string;
        }
        • caller: EpCaller
        • endpoint: string
        • pinned: ReadonlySet<string>

          The exact ids this connection's credential holds inst rails for.

        • OptionalprobeDeadlineMs?: number
        • Optionalreport?: (line: string) => void

          Where a refusal is announced. Defaults to stderr; the suite captures it.

        • space: string

      Returns {
          livenessOf: (instanceId: string) => ScatterInstanceLiveness;
          probeLiveness: (instanceId: string) => Promise<EpInstanceLiveness>;
      }

      • livenessOf: (instanceId: string) => ScatterInstanceLiveness

        What was established about one silent slot, for the row that will describe it.

      • probeLiveness: (instanceId: string) => Promise<EpInstanceLiveness>