feat(gateway): runtime_config_key in config

This commit is contained in:
alyssa 2025-04-20 18:47:29 +00:00
parent 7ba16c1347
commit bfa0071f90
2 changed files with 8 additions and 1 deletions

View file

@ -35,7 +35,11 @@ async fn real_main() -> anyhow::Result<()> {
let runtime_config = Arc::new(
RuntimeConfig::new(
redis.clone(),
format!("gateway:{}", cluster_config().node_id),
format!(
"{}:{}",
libpk::config.runtime_config_key.as_ref().unwrap(),
cluster_config().node_id
),
)
.await?,
);

View file

@ -116,6 +116,9 @@ pub struct PKConfig {
#[serde(default = "_json_log_default")]
pub(crate) json_log: bool,
#[serde(default)]
pub runtime_config_key: Option<String>,
#[serde(default)]
pub sentry_url: Option<String>,
}