From 0bd8856e2fbe87c2f966ee2b93d7c693361eddc3 Mon Sep 17 00:00:00 2001 From: discord9 <55937128+discord9@users.noreply.github.com> Date: Thu, 5 Jun 2025 20:34:11 +0800 Subject: [PATCH] chore: pub flow info (#6253) * chore: make all flow info's field public * chore: expose flow_route * chore: more pub --- src/common/meta/src/key/flow.rs | 2 +- src/common/meta/src/key/flow/flow_info.rs | 24 +++++++++++------------ src/meta-srv/src/handler.rs | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/common/meta/src/key/flow.rs b/src/common/meta/src/key/flow.rs index 9db5205448..e4dcffa698 100644 --- a/src/common/meta/src/key/flow.rs +++ b/src/common/meta/src/key/flow.rs @@ -14,7 +14,7 @@ pub mod flow_info; pub(crate) mod flow_name; -pub(crate) mod flow_route; +pub mod flow_route; pub mod flow_state; mod flownode_addr_helper; pub(crate) mod flownode_flow; diff --git a/src/common/meta/src/key/flow/flow_info.rs b/src/common/meta/src/key/flow/flow_info.rs index d75eb6efe3..d93ec92c32 100644 --- a/src/common/meta/src/key/flow/flow_info.rs +++ b/src/common/meta/src/key/flow/flow_info.rs @@ -114,37 +114,37 @@ impl<'a> MetadataKey<'a, FlowInfoKeyInner> for FlowInfoKeyInner { #[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] pub struct FlowInfoValue { /// The source tables used by the flow. - pub(crate) source_table_ids: Vec, + pub source_table_ids: Vec, /// The sink table used by the flow. - pub(crate) sink_table_name: TableName, + pub sink_table_name: TableName, /// Which flow nodes this flow is running on. - pub(crate) flownode_ids: BTreeMap, + pub flownode_ids: BTreeMap, /// The catalog name. - pub(crate) catalog_name: String, + pub catalog_name: String, /// The query context used when create flow. /// Although flow doesn't belong to any schema, this query_context is needed to remember /// the query context when `create_flow` is executed /// for recovering flow using the same sql&query_context after db restart. /// if none, should use default query context #[serde(default)] - pub(crate) query_context: Option, + pub query_context: Option, /// The flow name. - pub(crate) flow_name: String, + pub flow_name: String, /// The raw sql. - pub(crate) raw_sql: String, + pub raw_sql: String, /// The expr of expire. /// Duration in seconds as `i64`. - pub(crate) expire_after: Option, + pub expire_after: Option, /// The comment. - pub(crate) comment: String, + pub comment: String, /// The options. - pub(crate) options: HashMap, + pub options: HashMap, /// The created time #[serde(default)] - pub(crate) created_time: DateTime, + pub created_time: DateTime, /// The updated time. #[serde(default)] - pub(crate) updated_time: DateTime, + pub updated_time: DateTime, } impl FlowInfoValue { diff --git a/src/meta-srv/src/handler.rs b/src/meta-srv/src/handler.rs index 4d621fa07a..6ab5496c7c 100644 --- a/src/meta-srv/src/handler.rs +++ b/src/meta-srv/src/handler.rs @@ -375,7 +375,7 @@ impl HeartbeatMailbox { /// Parses the [Instruction] from [MailboxMessage]. #[cfg(test)] - pub(crate) fn json_instruction(msg: &MailboxMessage) -> Result { + pub fn json_instruction(msg: &MailboxMessage) -> Result { let Payload::Json(payload) = msg.payload .as_ref()