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

    Class SecretCache

    Read-through LRU cache in front of a SecretsProvider. Reads (get*, require, exists, getMany) are cached, including negative results; writes pass through and invalidate the name; list, getAll and metadata always reach the provider.

    Hierarchy (View Summary)

    Index
    • get activeWatchers(): number

      Number of active watchers.

      Returns number

    • get closed(): boolean

      Whether close was called.

      Returns boolean

    • Stops all watchers (the owning client calls this from close()); later calls fail with CANCELLED. Idempotent. Subclasses overriding it must call super.close().

      Returns Promise<void>

    • Throws CancelledError ("<operation>: client is closed", not retryable) once close was called (SPEC §2.4). The public operations call it before any I/O; service operations can call it too.

      Parameters

      • operation: string

      Returns void

    • Drops every cached entry of name (all versions and paths).

      Parameters

      • name: string

      Returns void

    • Sets environment variables from secrets: a path (one variable per secret directly under it) or a mapping { ENV_NAME: "secret/name" }. Returns { envName: secretName } for the variables that were set (never values).

      Parameters

      • source: string | Readonly<Record<string, string>>
      • options: LoadEnvOptions = {}

      Returns Promise<Record<string, string>>