iya-sts
    Preparing search index...
    nextStep: (
        envelope: SecretEnvelope,
        nowMs: number,
        rotationMs: number,
        overlapMs: number,
        fresh: () => string,
    ) => { envelope: SecretEnvelope; step: string } = ClusterSecrets.nextStep

    Type Declaration

      • (
            envelope: SecretEnvelope,
            nowMs: number,
            rotationMs: number,
            overlapMs: number,
            fresh: () => string,
        ): { envelope: SecretEnvelope; step: string }
      • Decides what a rotation does to one stored envelope at a moment: date a bare value, publish a next value, promote it, or drop an expired previous one. Pure, so a test can walk every step.

        Parameters

        • envelope: SecretEnvelope

          the stored envelope

        • nowMs: number

          the moment

        • rotationMs: number

          the interval between rotations; 0 never rotates

        • overlapMs: number

          how long the previous value is still accepted

        • fresh: () => string

          makes a new value

        Returns { envelope: SecretEnvelope; step: string }

        { envelope, step }, step '' when nothing is to change