pub enum RpcMessage {
Show 20 variants
RequestVote {
term: u64,
candidate_id: OxirsNodeId,
last_log_index: u64,
last_log_term: u64,
},
VoteResponse {
term: u64,
vote_granted: bool,
},
AppendEntries {
term: u64,
leader_id: OxirsNodeId,
prev_log_index: u64,
prev_log_term: u64,
entries: Vec<LogEntry>,
leader_commit: u64,
},
AppendEntriesResponse {
term: u64,
success: bool,
last_log_index: u64,
},
ClientRequest {
command: RdfCommand,
},
ClientResponse {
response: RdfResponse,
},
Heartbeat {
term: u64,
leader_id: OxirsNodeId,
},
HeartbeatResponse {
term: u64,
},
ShardOperation(ShardOperation),
StoreTriple {
shard_id: ShardId,
triple: Triple,
},
ReplicateTriple {
shard_id: ShardId,
triple: Triple,
},
QueryShard {
shard_id: ShardId,
subject: Option<String>,
predicate: Option<String>,
object: Option<String>,
},
QueryShardResponse {
shard_id: ShardId,
results: Vec<Triple>,
},
TransactionPrepare {
tx_id: String,
shard_id: ShardId,
operations: Vec<TransactionOp>,
},
TransactionVote {
tx_id: String,
shard_id: ShardId,
vote: bool,
},
TransactionCommit {
tx_id: String,
shard_id: ShardId,
},
TransactionAbort {
tx_id: String,
shard_id: ShardId,
},
TransactionAck {
tx_id: String,
shard_id: ShardId,
},
MigrationBatch {
migration_id: String,
batch: MigrationBatch,
},
ShardTransfer {
shard_id: ShardId,
triples: Vec<Triple>,
source_node: OxirsNodeId,
},
}Expand description
RPC message types for Raft protocol
Variants§
RequestVote
Request vote message
VoteResponse
Vote response
AppendEntries
Append entries message
Fields
§
leader_id: OxirsNodeIdAppendEntriesResponse
Append entries response
ClientRequest
Client request
Fields
§
command: RdfCommandClientResponse
Client response
Fields
§
response: RdfResponseHeartbeat
Heartbeat message
HeartbeatResponse
Heartbeat response
ShardOperation(ShardOperation)
Shard operation message
StoreTriple
Store triple to shard
ReplicateTriple
Replicate triple to shard
QueryShard
Query shard
QueryShardResponse
Query shard response
TransactionPrepare
Transaction prepare request
TransactionVote
Transaction vote response
TransactionCommit
Transaction commit request
TransactionAbort
Transaction abort request
TransactionAck
Transaction acknowledgment
MigrationBatch
Migration batch transfer
ShardTransfer
Shard data transfer during migration
Trait Implementations§
Source§impl Clone for RpcMessage
impl Clone for RpcMessage
Source§impl Debug for RpcMessage
impl Debug for RpcMessage
Source§impl<'de> Deserialize<'de> for RpcMessage
impl<'de> Deserialize<'de> for RpcMessage
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
Auto Trait Implementations§
impl Freeze for RpcMessage
impl RefUnwindSafe for RpcMessage
impl Send for RpcMessage
impl Sync for RpcMessage
impl Unpin for RpcMessage
impl UnsafeUnpin for RpcMessage
impl UnwindSafe for RpcMessage
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> MaybeDebug for T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.