@grow-codes/hashicorp-vault - v0.1.1
    Preparing search index...

    Class TokenRenewer

    Renews the client token at 2/3 of its TTL (renew-self). When the token cannot be renewed any more it logs in again (reauth) or calls onExpire once at expiry. Stopped by stop() or client.close().

    Index
    • get expired(): boolean

      Whether onExpire fired.

      Returns boolean

    • get expiresAt(): number

      Expiry of the current token (ms since epoch), 0 when it never expires or is unknown.

      Returns number

    • get running(): boolean

      Whether the renewer is active.

      Returns boolean

    • Starts renewing. Without initial, the TTL is read with lookupSelf(). A token without TTL (e.g. root) needs no renewal; the renewer then stays idle.

      Parameters

      Returns Promise<void>

    • Stops renewing. Idempotent.

      Returns void