Class Vault.Builder

java.lang.Object
io.helidon.integrations.vault.Vault.Builder
All Implemented Interfaces:
Builder<Vault.Builder,Vault>, Supplier<Vault>
Enclosing interface:
Vault

public static class Vault.Builder extends Object implements Builder<Vault.Builder,Vault>
Fluent API builder for Vault.
  • Method Details

    • build

      public Vault build()
      Description copied from interface: Builder
      Build the instance from this builder.
      Specified by:
      build in interface Builder<Vault.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<WebClientConfig.Builder> updater)
      A consumer that updates WebClientConfig.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
    • baseNamespace

      public Vault.Builder baseNamespace(String baseNamespace)
      Base namespace to use when invoking Vault operations.
      Parameters:
      baseNamespace - base namespace
      Returns:
      updated builder
    • address

      public Optional<String> address()
      Vault address (if configured).
      Returns:
      vault address
    • token

      public Optional<String> token()
      Token (if configured).
      Returns:
      token
    • baseNamespace

      public Optional<String> baseNamespace()
      Base namespace (if configured).
      Returns:
      namespace to use
    • ftHandler

      public FtHandler ftHandler()
      Configured fault tolerance handler.
      Returns:
      FT Handler
    • config

      public Config config()
      Current config.
      Returns:
      config instance
    • webClientUpdater

      public Consumer<WebClientConfig.Builder> webClientUpdater()
      Update to web client setup. Used by authentication methods
      Returns:
      web client updater