pub enum ClientRequest {
Propose(Vec<u8>),
Query(Vec<u8>),
ProposeKeyed {
key: Vec<u8>,
command: Vec<u8>,
},
QueryKeyed {
key: Vec<u8>,
query: Vec<u8>,
},
ReadIndexConfirm {
route_key: Option<Vec<u8>>,
},
TwoPhasePrepare {
tx_id: Vec<u8>,
key: Vec<u8>,
command: Vec<u8>,
},
TwoPhaseCommit {
tx_id: Vec<u8>,
key: Vec<u8>,
},
TwoPhaseAbort {
tx_id: Vec<u8>,
key: Vec<u8>,
},
}Expand description
A request from a client to the cluster.
Variants§
Propose(Vec<u8>)
A write: application-encoded command replicated through the Raft log.
Query(Vec<u8>)
A linearizable read: application-encoded query answered via ReadIndex.
ProposeKeyed
A write routed to the Raft group owning key (multi-Raft, write-sharding-multi-raft).
Fields
QueryKeyed
A linearizable read routed to the Raft group owning key.
ReadIndexConfirm
Ask the leader to confirm a linearizable read index without executing a query (etcd-style follower read setup, read-consistency).
TwoPhasePrepare
Stage a command in leader memory for cross-shard 2PC (optional Tier 2).
Fields
TwoPhaseCommit
Commit a previously prepared command through the normal Raft log.
TwoPhaseAbort
Drop a previously prepared command without committing.
Trait Implementations§
Source§impl Clone for ClientRequest
impl Clone for ClientRequest
Source§fn clone(&self) -> ClientRequest
fn clone(&self) -> ClientRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ClientRequest
impl Debug for ClientRequest
Source§impl<'de> Deserialize<'de> for ClientRequest
impl<'de> Deserialize<'de> for ClientRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ClientRequest
Source§impl PartialEq for ClientRequest
impl PartialEq for ClientRequest
Source§impl Serialize for ClientRequest
impl Serialize for ClientRequest
impl StructuralPartialEq for ClientRequest
Auto Trait Implementations§
impl Freeze for ClientRequest
impl RefUnwindSafe for ClientRequest
impl Send for ClientRequest
impl Sync for ClientRequest
impl Unpin for ClientRequest
impl UnsafeUnpin for ClientRequest
impl UnwindSafe for ClientRequest
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