pub enum LockMessage {
Acquire {
table: String,
key: Vec<u8>,
lease_ms: u64,
node_id: u32,
req_id: u64,
},
AcquireAck {
req_id: u64,
granted: bool,
fencing_token: u64,
},
Release {
table: String,
key: Vec<u8>,
fencing_token: u64,
node_id: u32,
},
Heartbeat {
node_id: u32,
fencing_tokens: Vec<u64>,
},
}Expand description
분산 락(Network Lock) 전용 프로토콜
Variants§
Acquire
특정 테이블 및 키에 대한 Lease 획득 요청
AcquireAck
Lock 획득 요청에 대한 응답
Release
성공적으로 사용을 마친 후 Lock 반환
Heartbeat
네트워크 단절에 의한 Lock 탈취 방지용 Heartbeat 만료 연장
Trait Implementations§
Source§impl Clone for LockMessage
impl Clone for LockMessage
Source§fn clone(&self) -> LockMessage
fn clone(&self) -> LockMessage
Returns a duplicate of the value. Read more
1.0.0 · 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 LockMessage
impl Debug for LockMessage
Source§impl<'de> Deserialize<'de> for LockMessage
impl<'de> Deserialize<'de> for LockMessage
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
Source§impl PartialEq for LockMessage
impl PartialEq for LockMessage
Source§impl Serialize for LockMessage
impl Serialize for LockMessage
impl StructuralPartialEq for LockMessage
Auto Trait Implementations§
impl Freeze for LockMessage
impl RefUnwindSafe for LockMessage
impl Send for LockMessage
impl Sync for LockMessage
impl Unpin for LockMessage
impl UnsafeUnpin for LockMessage
impl UnwindSafe for LockMessage
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more