vitess_grpc/generated/
replicationdata.rs

1/// Status is the replication status for MySQL/MariaDB/File-based. Returned by a
2/// flavor-specific command and parsed into a Position and fields.
3#[allow(clippy::derive_partial_eq_without_eq)]
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct Status {
6    #[prost(string, tag = "1")]
7    pub position: ::prost::alloc::string::String,
8    #[prost(uint32, tag = "4")]
9    pub replication_lag_seconds: u32,
10    #[prost(string, tag = "5")]
11    pub source_host: ::prost::alloc::string::String,
12    #[prost(int32, tag = "6")]
13    pub source_port: i32,
14    #[prost(int32, tag = "7")]
15    pub connect_retry: i32,
16    /// RelayLogPosition will be empty for flavors that do not support returning the full GTIDSet from the relay log, such as MariaDB.
17    #[prost(string, tag = "8")]
18    pub relay_log_position: ::prost::alloc::string::String,
19    #[prost(string, tag = "9")]
20    pub file_position: ::prost::alloc::string::String,
21    #[prost(string, tag = "10")]
22    pub relay_log_source_binlog_equivalent_position: ::prost::alloc::string::String,
23    #[prost(uint32, tag = "11")]
24    pub source_server_id: u32,
25    #[prost(string, tag = "12")]
26    pub source_uuid: ::prost::alloc::string::String,
27    #[prost(int32, tag = "13")]
28    pub io_state: i32,
29    #[prost(string, tag = "14")]
30    pub last_io_error: ::prost::alloc::string::String,
31    #[prost(int32, tag = "15")]
32    pub sql_state: i32,
33    #[prost(string, tag = "16")]
34    pub last_sql_error: ::prost::alloc::string::String,
35    #[prost(string, tag = "17")]
36    pub relay_log_file_position: ::prost::alloc::string::String,
37    #[prost(string, tag = "18")]
38    pub source_user: ::prost::alloc::string::String,
39    #[prost(uint32, tag = "19")]
40    pub sql_delay: u32,
41    #[prost(bool, tag = "20")]
42    pub auto_position: bool,
43    #[prost(bool, tag = "21")]
44    pub using_gtid: bool,
45    #[prost(bool, tag = "22")]
46    pub has_replication_filters: bool,
47    #[prost(bool, tag = "23")]
48    pub ssl_allowed: bool,
49    #[prost(bool, tag = "24")]
50    pub replication_lag_unknown: bool,
51}
52/// StopReplicationStatus represents the replication status before calling StopReplication, and the replication status collected immediately after
53/// calling StopReplication.
54#[allow(clippy::derive_partial_eq_without_eq)]
55#[derive(Clone, PartialEq, ::prost::Message)]
56pub struct StopReplicationStatus {
57    #[prost(message, optional, tag = "1")]
58    pub before: ::core::option::Option<Status>,
59    #[prost(message, optional, tag = "2")]
60    pub after: ::core::option::Option<Status>,
61}
62/// PrimaryStatus is the replication status for a MySQL primary (returned by 'show master status').
63#[allow(clippy::derive_partial_eq_without_eq)]
64#[derive(Clone, PartialEq, ::prost::Message)]
65pub struct PrimaryStatus {
66    #[prost(string, tag = "1")]
67    pub position: ::prost::alloc::string::String,
68    #[prost(string, tag = "2")]
69    pub file_position: ::prost::alloc::string::String,
70}
71/// FullStatus contains the full status of MySQL including the replication information, semi-sync information, GTID information among others
72#[allow(clippy::derive_partial_eq_without_eq)]
73#[derive(Clone, PartialEq, ::prost::Message)]
74pub struct FullStatus {
75    #[prost(uint32, tag = "1")]
76    pub server_id: u32,
77    #[prost(string, tag = "2")]
78    pub server_uuid: ::prost::alloc::string::String,
79    #[prost(message, optional, tag = "3")]
80    pub replication_status: ::core::option::Option<Status>,
81    #[prost(message, optional, tag = "4")]
82    pub primary_status: ::core::option::Option<PrimaryStatus>,
83    #[prost(string, tag = "5")]
84    pub gtid_purged: ::prost::alloc::string::String,
85    #[prost(string, tag = "6")]
86    pub version: ::prost::alloc::string::String,
87    #[prost(string, tag = "7")]
88    pub version_comment: ::prost::alloc::string::String,
89    #[prost(bool, tag = "8")]
90    pub read_only: bool,
91    #[prost(string, tag = "9")]
92    pub gtid_mode: ::prost::alloc::string::String,
93    #[prost(string, tag = "10")]
94    pub binlog_format: ::prost::alloc::string::String,
95    #[prost(string, tag = "11")]
96    pub binlog_row_image: ::prost::alloc::string::String,
97    #[prost(bool, tag = "12")]
98    pub log_bin_enabled: bool,
99    #[prost(bool, tag = "13")]
100    pub log_replica_updates: bool,
101    #[prost(bool, tag = "14")]
102    pub semi_sync_primary_enabled: bool,
103    #[prost(bool, tag = "15")]
104    pub semi_sync_replica_enabled: bool,
105    #[prost(bool, tag = "16")]
106    pub semi_sync_primary_status: bool,
107    #[prost(bool, tag = "17")]
108    pub semi_sync_replica_status: bool,
109    #[prost(uint32, tag = "18")]
110    pub semi_sync_primary_clients: u32,
111    #[prost(uint64, tag = "19")]
112    pub semi_sync_primary_timeout: u64,
113    #[prost(uint32, tag = "20")]
114    pub semi_sync_wait_for_replica_count: u32,
115    #[prost(bool, tag = "21")]
116    pub super_read_only: bool,
117}
118/// StopReplicationMode is used to provide controls over how replication is stopped.
119#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
120#[repr(i32)]
121pub enum StopReplicationMode {
122    Ioandsqlthread = 0,
123    Iothreadonly = 1,
124}
125impl StopReplicationMode {
126    /// String value of the enum field names used in the ProtoBuf definition.
127    ///
128    /// The values are not transformed in any way and thus are considered stable
129    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
130    pub fn as_str_name(&self) -> &'static str {
131        match self {
132            StopReplicationMode::Ioandsqlthread => "IOANDSQLTHREAD",
133            StopReplicationMode::Iothreadonly => "IOTHREADONLY",
134        }
135    }
136    /// Creates an enum from field names used in the ProtoBuf definition.
137    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
138        match value {
139            "IOANDSQLTHREAD" => Some(Self::Ioandsqlthread),
140            "IOTHREADONLY" => Some(Self::Iothreadonly),
141            _ => None,
142        }
143    }
144}