Class Vault.Builder

    • Method Detail

      • build

        public Vault build()
        Description copied from interface: Builder
        Build the instance from this builder.
        Specified by:
        build in interface Builder<Vault>
        Returns:
        instance of the built type
      • addVaultAuth

        public Vault.Builder addVaultAuth​(VaultAuth vaultAuth)
        Add a VaultAuth to use with this Vault. Also all VaultAuths discovered by service loader are used.
        Parameters:
        vaultAuth - vault authentication mechanism to use
        Returns:
        updated builder
      • address

        public Vault.Builder address​(String address)
        Configure address of the Vault, including scheme, host, and port.
        Parameters:
        address - address of the Vault
        Returns:
        updated builder instance
      • token

        public Vault.Builder token​(String token)
        Configure token to use to connect to the Vault.
        Parameters:
        token - token to use
        Returns:
        updated builder instance
      • faultTolerance

        public Vault.Builder faultTolerance​(FtHandler faultTolerance)
        An FtHandler can be configured to be used by all calls to the Vault, to add support for retries, circuit breakers, bulkhead etc.
        Parameters:
        faultTolerance - fault tolerance handler to use
        Returns:
        updated builder instance
      • updateWebClient

        public Vault.Builder updateWebClient​(Consumer<WebClient.Builder> updater)
        A consumer that updates WebClient.Builder. The consumer may be invoked multiple times, for example when a Vault authentication must use an un-authenticated Vault to authenticate.
        Parameters:
        updater - update the web client builder
        Returns:
        updated builder instance
      • disableVaultAuthDiscovery

        public Vault.Builder disableVaultAuthDiscovery()
        Do not discover VaultAuth implementations using a service loader.
        Returns:
        updated builder instance
      • config

        public Vault.Builder config​(Config config)
        Update this builder from configuration.
        Parameters:
        config - configuration to use
        Returns:
        updated builder instance
      • config

        public Config config()