Enum redis_driver::RoleResult
source · pub enum RoleResult {
Master {
master_replication_offset: usize,
replica_infos: Vec<ReplicaInfo>,
},
Replica {
master_ip: String,
master_port: u16,
state: ReplicationState,
amount_data_received: isize,
},
Sentinel {
master_names: Vec<String>,
},
}
Expand description
Result for the role
command.
Variants
Master
Fields
master_replication_offset: usize
The current master replication offset, which is an offset that masters and replicas share to understand, in partial resynchronizations, the part of the replication stream the replicas needs to fetch to continue.
replica_infos: Vec<ReplicaInfo>
information av=bout the connected replicas
Replica
Fields
master_ip: String
The IP of the master.
master_port: u16
The port number of the master.
state: ReplicationState
The state of the replication from the point of view of the master
amount_data_received: isize
The amount of data received from the replica so far in terms of master replication offset.
Sentinel
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for RoleResult
impl Send for RoleResult
impl Sync for RoleResult
impl Unpin for RoleResult
impl UnwindSafe for RoleResult
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more