From 5e5448bdd899ba9ba263200616a348acda5eb0ed Mon Sep 17 00:00:00 2001 From: jbordalo Date: Wed, 11 Feb 2026 13:59:59 +0000 Subject: Add support for differing username between cluster and local machine --- src/context.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/context.rs') diff --git a/src/context.rs b/src/context.rs index f67c302..4c1b639 100644 --- a/src/context.rs +++ b/src/context.rs @@ -15,6 +15,7 @@ pub struct Context { job_id: Option, infer_job_id: bool, frontend_hostname: Option, + cluster_username: Option } impl Context { @@ -22,12 +23,14 @@ impl Context { job_id: Option, infer_job_id: bool, frontend_hostname: Option, + cluster_username: Option ) -> Result { Ok(Self { node: get_execution_node().await?, job_id, infer_job_id, frontend_hostname, + cluster_username }) } @@ -57,6 +60,12 @@ impl Context { .as_deref() .ok_or_else(|| eyre::eyre!("missing frontend hostname")) } + + pub fn cluster_username(&self) -> Result<&str> { + self.cluster_username + .as_deref() + .ok_or_else(|| eyre::eyre!("missing cluster username")) + } } async fn get_execution_node() -> Result { -- cgit