Struct etcd_client::KvClient [−][src]
#[repr(transparent)]pub struct KvClient { /* fields omitted */ }
Client for KV operations.
Implementations
impl KvClient
[src]
impl KvClient
[src]pub async fn put(
&mut self,
key: impl Into<Vec<u8>>,
value: impl Into<Vec<u8>>,
options: Option<PutOptions>
) -> Result<PutResponse, Error>
[src]
&mut self,
key: impl Into<Vec<u8>>,
value: impl Into<Vec<u8>>,
options: Option<PutOptions>
) -> Result<PutResponse, Error>
Puts the given key into the key-value store. A put request increments the revision of the key-value store and generates one event in the event history.
pub async fn get(
&mut self,
key: impl Into<Vec<u8>>,
options: Option<GetOptions>
) -> Result<GetResponse, Error>
[src]
&mut self,
key: impl Into<Vec<u8>>,
options: Option<GetOptions>
) -> Result<GetResponse, Error>
Gets the key or a range of keys from the store.
pub async fn delete(
&mut self,
key: impl Into<Vec<u8>>,
options: Option<DeleteOptions>
) -> Result<DeleteResponse, Error>
[src]
&mut self,
key: impl Into<Vec<u8>>,
options: Option<DeleteOptions>
) -> Result<DeleteResponse, Error>
Deletes the given key or a range of keys from the key-value store.
pub async fn compact(
&mut self,
revision: i64,
options: Option<CompactionOptions>
) -> Result<CompactionResponse, Error>
[src]
&mut self,
revision: i64,
options: Option<CompactionOptions>
) -> Result<CompactionResponse, Error>
Compacts the event history in the etcd key-value store. The key-value store should be periodically compacted or the event history will continue to grow indefinitely.
pub async fn txn(&mut self, txn: Txn) -> Result<TxnResponse, Error>
[src]
Processes multiple operations in a single transaction. A txn request increments the revision of the key-value store and generates events with the same revision for every completed operation. It is not allowed to modify the same key several times within one txn.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for KvClient
impl !RefUnwindSafe for KvClient
impl !UnwindSafe for KvClient
impl !UnwindSafe for KvClient
Blanket Implementations
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> IntoRequest<T> for T
[src]
impl<T> IntoRequest<T> for T
[src]pub fn into_request(self) -> Request<T>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
impl<T> WithSubscriber for T
[src]pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,