pub struct Client { /* private fields */ }
Expand description
Vault client connection information.
Implementations§
source§impl Client
impl Client
sourcepub fn new(config: Config) -> Result<Self, ClientError>
pub fn new(config: Config) -> Result<Self, ClientError>
Creates a new Vault client. See config for explanation of parameters.
Note that this constructor does not attempt to connect to the vault server,
so the vault server does not need to be running at the time a LinkDefinition
to this provider is created.
sourcepub async fn read_secret(
&self,
path: &str,
) -> Result<Option<HashMap<String, String>>, Error>
pub async fn read_secret( &self, path: &str, ) -> Result<Option<HashMap<String, String>>, Error>
Reads value of secret using namespace and key path
sourcepub async fn write_secret(
&self,
path: &str,
data: &HashMap<String, String>,
) -> Result<(), Error>
pub async fn write_secret( &self, path: &str, data: &HashMap<String, String>, ) -> Result<(), Error>
Writes value of secret using namespace and key path
sourcepub async fn set_renewal(&self)
pub async fn set_renewal(&self)
Sets up a background task to renew the token at the configured interval. This function
attempts to lock the renew_task
mutex and will deadlock if called without first ensuring
the lock is available.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request