Skip to content

Commit 82ed483

Browse files
authored
feat: expose YCQL port in devnet-info export (#88)
1 parent 96c354f commit 82ed483

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

src/external_api/devnet_info.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,4 +140,6 @@ pub struct YugabyteInfo {
140140
pub master_rpc_port: u16,
141141
/// YSQL port for Postgres-compatible connections
142142
pub ysql_port: u16,
143+
/// YCQL port for Cassandra-compatible connections
144+
pub ycql_port: u16,
143145
}

src/external_api/export.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,10 +286,19 @@ fn build_yugabyte_info(
286286
provider_id
287287
))?;
288288

289+
let ycql_port: u16 = ctx
290+
.get(&format!("yugabyte_{}_ycql_port", provider_id))
291+
.and_then(|p| p.parse().ok())
292+
.ok_or(format!(
293+
"yugabyte_{}_ycql_port not found or invalid in context",
294+
provider_id
295+
))?;
296+
289297
Ok(YugabyteInfo {
290298
web_ui_url: format!("http://localhost:{}", web_ui_port),
291299
master_rpc_port,
292300
ysql_port,
301+
ycql_port,
293302
})
294303
}
295304

0 commit comments

Comments
 (0)