public class ReactiveVaultTemplate extends Object implements ReactiveVaultOperations
ReactiveVaultTemplate will log
into Vault on initialization and use the token throughout the whole lifetime.SessionManager| Constructor and Description |
|---|
ReactiveVaultTemplate(VaultEndpoint vaultEndpoint,
org.springframework.http.client.reactive.ClientHttpConnector connector,
VaultTokenSupplier vaultTokenSupplier)
Create a new
ReactiveVaultTemplate with a VaultEndpoint,
ClientHttpConnector and VaultTokenSupplier. |
ReactiveVaultTemplate(VaultEndpointProvider endpointProvider,
org.springframework.http.client.reactive.ClientHttpConnector connector,
VaultTokenSupplier vaultTokenSupplier)
Create a new
ReactiveVaultTemplate with a VaultEndpointProvider,
ClientHttpConnector and VaultTokenSupplier. |
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Mono<Void> |
delete(String path)
Delete a path.
|
<V,T extends org.reactivestreams.Publisher<V>> |
doWithSession(Function<org.springframework.web.reactive.function.client.WebClient,? extends T> sessionCallback)
Executes a Vault
RestOperationsCallback. |
<V,T extends org.reactivestreams.Publisher<V>> |
doWithVault(Function<org.springframework.web.reactive.function.client.WebClient,? extends T> clientCallback)
Executes a Vault
RestOperationsCallback. |
reactor.core.publisher.Flux<String> |
list(String path)
Enumerate keys from a Vault path.
|
reactor.core.publisher.Mono<VaultResponse> |
read(String path)
Read from a Vault path.
|
<T> reactor.core.publisher.Mono<VaultResponseSupport<T>> |
read(String path,
Class<T> responseType)
Read from a Vault path.
|
reactor.core.publisher.Mono<VaultResponse> |
write(String path,
Object body)
Write to a Vault path.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwritepublic ReactiveVaultTemplate(VaultEndpoint vaultEndpoint, org.springframework.http.client.reactive.ClientHttpConnector connector, VaultTokenSupplier vaultTokenSupplier)
ReactiveVaultTemplate with a VaultEndpoint,
ClientHttpConnector and VaultTokenSupplier.vaultEndpoint - must not be null.connector - must not be null.vaultTokenSupplier - must not be null.public ReactiveVaultTemplate(VaultEndpointProvider endpointProvider, org.springframework.http.client.reactive.ClientHttpConnector connector, VaultTokenSupplier vaultTokenSupplier)
ReactiveVaultTemplate with a VaultEndpointProvider,
ClientHttpConnector and VaultTokenSupplier.endpointProvider - must not be null.connector - must not be null.vaultTokenSupplier - must not be null.public reactor.core.publisher.Mono<VaultResponse> read(String path)
ReactiveVaultOperationsread in interface ReactiveVaultOperationspath - must not be null.public <T> reactor.core.publisher.Mono<VaultResponseSupport<T>> read(String path, Class<T> responseType)
ReactiveVaultOperationsread in interface ReactiveVaultOperationspath - must not be null.responseType - must not be null.public reactor.core.publisher.Flux<String> list(String path)
ReactiveVaultOperationslist in interface ReactiveVaultOperationspath - must not be null.public reactor.core.publisher.Mono<VaultResponse> write(String path, @Nullable Object body)
ReactiveVaultOperationswrite in interface ReactiveVaultOperationspath - must not be null.body - the body, may be null if absent.public reactor.core.publisher.Mono<Void> delete(String path)
ReactiveVaultOperationsdelete in interface ReactiveVaultOperationspath - must not be null.public <V,T extends org.reactivestreams.Publisher<V>> T doWithVault(Function<org.springframework.web.reactive.function.client.WebClient,? extends T> clientCallback) throws VaultException, org.springframework.web.reactive.function.client.WebClientException
ReactiveVaultOperationsRestOperationsCallback. Allows to interact with Vault
using RestOperations without requiring a
session.doWithVault in interface ReactiveVaultOperationsclientCallback - the request.RestOperationsCallback return value.VaultException - when a
HttpStatusCodeException occurs.org.springframework.web.reactive.function.client.WebClientException - exceptions from
WebClient.public <V,T extends org.reactivestreams.Publisher<V>> T doWithSession(Function<org.springframework.web.reactive.function.client.WebClient,? extends T> sessionCallback) throws VaultException, org.springframework.web.reactive.function.client.WebClientException
ReactiveVaultOperationsRestOperationsCallback. Allows to interact with Vault in
an authenticated session.doWithSession in interface ReactiveVaultOperationssessionCallback - the request.RestOperationsCallback return value.VaultException - when a
HttpStatusCodeException occurs.org.springframework.web.reactive.function.client.WebClientException - exceptions from
WebClient.Copyright © 2016–2018 Pivotal Software, Inc.. All rights reserved.