pub const WAL_TOPIC: &str = "wal";
pub const TABLE_CONTENT_TOPIC_PREFIX: &str = "table.";
pub const TABLES_TOPIC: &str = "tables";
pub const METRICS_TOPIC: &str = "metrics";
pub const HEALTH_STATUS_TOPIC: &str = "healthstatus";
pub const SYNC_REQUEST_TOPIC: u16 = 2;
pub const SYNC_DATA_BEGIN_TOPIC: u16 = 5;
pub const SYNC_DATA_CHUNK_TOPIC: u16 = 6;
pub const SYNC_DATA_END_TOPIC: u16 = 7;
pub const SYNC_ACK_TOPIC: u16 = 8;
pub fn get_table_content_topic(table_name: &str) -> alloc::string::String {
alloc::format!("{}{}", TABLE_CONTENT_TOPIC_PREFIX, table_name)
}
pub fn get_all_wal_topics() -> alloc::vec::Vec<&'static str> {
alloc::vec![WAL_TOPIC,]
}
pub fn get_core_topics() -> alloc::vec::Vec<&'static str> {
alloc::vec![TABLES_TOPIC, METRICS_TOPIC, HEALTH_STATUS_TOPIC,]
}
pub fn get_ha_sync_topics() -> alloc::vec::Vec<u16> {
alloc::vec![
SYNC_REQUEST_TOPIC,
SYNC_DATA_BEGIN_TOPIC,
SYNC_DATA_CHUNK_TOPIC,
SYNC_DATA_END_TOPIC,
SYNC_ACK_TOPIC,
]
}