Struct etcd_client::Client[][src]

pub struct Client { /* fields omitted */ }
Expand description

Asynchronous etcd client using v3 API.

Implementations

Connect to etcd servers from given endpoints.

Gets a KV client.

Gets a watch client.

Gets a lease client.

Gets an auth client.

Gets a maintenance client.

Gets a cluster client.

Gets a lock client.

Gets a election client.

Put 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.

Gets the key from the key-value store.

Deletes the given key from the key-value store.

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.

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.

Watches for events happening or that have happened. Both input and output are streams; the input stream is for creating and canceling watcher and the output stream sends events. The entire event history can be watched starting from the last compaction revision.

Creates a lease which expires if the server does not receive a keepAlive within a given time to live period. All keys attached to the lease will be expired and deleted if the lease expires. Each expired key generates a delete event in the event history.

Revokes a lease. All keys attached to the lease will expire and be deleted.

Keeps the lease alive by streaming keep alive requests from the client to the server and streaming keep alive responses from the server to the client.

Retrieves lease information.

Lists all existing leases.

Lock acquires a distributed shared lock on a given named lock. On success, it will return a unique key that exists so long as the lock is held by the caller. This key can be used in conjunction with transactions to safely ensure updates to etcd only occur while holding lock ownership. The lock is held until Unlock is called on the key or the lease associate with the owner expires.

Unlock takes a key returned by Lock and releases the hold on lock. The next Lock caller waiting for the lock will then be woken up and given ownership of the lock.

Enables authentication.

Disables authentication.

Adds role.

Deletes role.

Gets role.

Lists role.

Grants role permission.

Revokes role permission.

Add an user.

Gets the user info by the user name.

Lists all users.

Deletes the given key from the key-value store.

Change password for an user.

Grant role for an user.

Revoke role for an user.

Maintain(get, active or inactive) alarms of members.

Gets the status of a member.

Defragments a member’s backend database to recover storage space.

Computes the hash of whole backend keyspace. including key, lease, and other buckets in storage. This is designed for testing ONLY!

Computes the hash of all MVCC keys up to a given revision. It only iterates "key" bucket in backend storage.

Gets a snapshot of the entire backend from a member over a stream to a client.

Adds current connected server as a member.

Remove a member.

Updates the member.

Promotes the member.

Lists members.

Moves the current leader node to target node.

Puts a value as eligible for the election on the prefix key. Multiple sessions can participate in the election for the same prefix, but only one can be the leader at a time.

Lets the leader announce a new value without another election.

Returns the leader value for the current election.

Returns a channel that reliably observes ordered leader proposals as GetResponse values on every current elected leader key.

Releases election leadership and then start a new election

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Wrap the input message T in a tonic::Request

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more