pub struct Journal {
pub id: i64,
pub migration_type: i32,
pub tables: Vec<String>,
pub local_position: String,
pub shard_gtids: Vec<ShardGtid>,
pub participants: Vec<KeyspaceShard>,
pub source_workflows: Vec<String>,
}Expand description
Journal contains the metadata for a journal event. The commit of a journal event indicates the point of no return for a migration.
Fields§
§id: i64Id represents a unique journal id.
migration_type: i32§tables: Vec<String>Tables is set if the journal represents a TABLES migration.
local_position: StringLocalPosition is the source position at which the migration happened.
shard_gtids: Vec<ShardGtid>ShardGtids is the list of targets to which the migration took place.
participants: Vec<KeyspaceShard>Participants is the list of source participants for a migration. Every participant is expected to have an identical journal entry. While streaming, the client must wait for the journal entry to be received from all pariticipants, and then replace them with new streams specified by ShardGtid. If a stream does not have all participants, a consistent migration is not possible.
source_workflows: Vec<String>SourceWorkflows is the list of workflows in the source shard that were migrated to the target. If a migration fails after a Journal is committed, this information is used to start the target streams that were created prior to the creation of the journal.
Implementations§
Source§impl Journal
impl Journal
Sourcepub fn migration_type(&self) -> MigrationType
pub fn migration_type(&self) -> MigrationType
Returns the enum value of migration_type, or the default if the field is set to an invalid enum value.
Sourcepub fn set_migration_type(&mut self, value: MigrationType)
pub fn set_migration_type(&mut self, value: MigrationType)
Sets migration_type to the provided enum value.
Trait Implementations§
Source§impl Message for Journal
impl Message for Journal
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self.impl StructuralPartialEq for Journal
Auto Trait Implementations§
impl Freeze for Journal
impl RefUnwindSafe for Journal
impl Send for Journal
impl Sync for Journal
impl Unpin for Journal
impl UnwindSafe for Journal
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
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request