[−][src]Struct etcdv3client::EtcdClient
Fields
kv: KvClient<Channel>
watch: WatchClient<Channel>
lease: LeaseClient<Channel>
cluster: ClusterClient<Channel>
maintenance: MaintenanceClient<Channel>
auth: AuthClient<Channel>
Methods
impl EtcdClient
[src]
pub async fn new(
endpoints: Vec<impl AsRef<str>>,
auth: Option<(String, String)>
) -> Result<Self, EtcdClientError>
[src]
endpoints: Vec<impl AsRef<str>>,
auth: Option<(String, String)>
) -> Result<Self, EtcdClientError>
Create a new EtcdClient
pub async fn get<'_>(
&'_ mut self,
key: impl AsRef<[u8]>
) -> Result<Vec<u8>, EtcdClientError>
[src]
&'_ mut self,
key: impl AsRef<[u8]>
) -> Result<Vec<u8>, EtcdClientError>
get a value with the given key
pub async fn get_string<'_>(
&'_ mut self,
key: impl AsRef<[u8]>
) -> Result<String, EtcdClientError>
[src]
&'_ mut self,
key: impl AsRef<[u8]>
) -> Result<String, EtcdClientError>
get a string with the given key
pub async fn get_prefix<'_>(
&'_ mut self,
key: impl AsRef<[u8]>
) -> Result<Vec<KeyValue>, EtcdClientError>
[src]
&'_ mut self,
key: impl AsRef<[u8]>
) -> Result<Vec<KeyValue>, EtcdClientError>
get key-value paire with prefix
pub async fn get_all<'_>(&'_ mut self) -> Result<Vec<KeyValue>, EtcdClientError>
[src]
get all key-value pairs
pub async fn put<'_>(
&'_ mut self,
key: impl AsRef<[u8]>,
value: impl AsRef<[u8]>
) -> Result<(), EtcdClientError>
[src]
&'_ mut self,
key: impl AsRef<[u8]>,
value: impl AsRef<[u8]>
) -> Result<(), EtcdClientError>
put a key-value pair
pub async fn delete<'_>(
&'_ mut self,
key: impl AsRef<[u8]>
) -> Result<(), EtcdClientError>
[src]
&'_ mut self,
key: impl AsRef<[u8]>
) -> Result<(), EtcdClientError>
delete a key-value
pub async fn delete_prefix<'_>(
&'_ mut self,
key: impl AsRef<[u8]>
) -> Result<Vec<KeyValue>, EtcdClientError>
[src]
&'_ mut self,
key: impl AsRef<[u8]>
) -> Result<Vec<KeyValue>, EtcdClientError>
delete key-value pairs with prefix
pub async fn get_token<'_>(
&'_ mut self,
username: impl ToString,
password: impl ToString
) -> Result<String, EtcdClientError>
[src]
&'_ mut self,
username: impl ToString,
password: impl ToString
) -> Result<String, EtcdClientError>
get a token with the given username and password
pub async fn watch<'_>(
&'_ mut self,
key: impl AsRef<[u8]>
) -> Result<Watcher, EtcdClientError>
[src]
&'_ mut self,
key: impl AsRef<[u8]>
) -> Result<Watcher, EtcdClientError>
watch a key
pub async fn watch_prefix<'_>(
&'_ mut self,
key: impl AsRef<[u8]>
) -> Result<Watcher, EtcdClientError>
[src]
&'_ mut self,
key: impl AsRef<[u8]>
) -> Result<Watcher, EtcdClientError>
watch a key with prefix
Auto Trait Implementations
impl Send for EtcdClient
impl Sync for EtcdClient
impl Unpin for EtcdClient
impl !UnwindSafe for EtcdClient
impl !RefUnwindSafe for EtcdClient
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,