Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker/dev-full/rivet-edge-server/config.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"cluster_id": "11ca8960-acab-4963-909c-99d72af3e1cb",
"datacenter_id": "f288913c-735d-4188-bf9b-2fcf6eac7b9c",
"server_id": "174aca2a-98b7-462c-9ad9-3835094a9a10",
"intercom_endpoint": "http://rivet-server:8081"
"intercom_address": "http://rivet-server:8081"
},
"guard": {
// TLS not configured for local development
Expand Down
2 changes: 1 addition & 1 deletion docker/dev-full/rivet-guard/config.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"cluster_id": "11ca8960-acab-4963-909c-99d72af3e1cb",
"datacenter_id": "f288913c-735d-4188-bf9b-2fcf6eac7b9c",
"server_id": "174aca2a-98b7-462c-9ad9-3835094a9a10",
"intercom_endpoint": "http://rivet-server:8081"
"intercom_address": "http://rivet-server:8081"
},
"guard": {
// TLS not configured for local development
Expand Down
4 changes: 3 additions & 1 deletion packages/common/config/src/config/server/rivet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -843,10 +843,12 @@ pub struct Edge {
pub cluster_id: Uuid,
pub datacenter_id: Uuid,
pub server_id: Uuid,
pub intercom_endpoint: Url,
/// Url of the core cluster.
pub intercom_address: Url,
/// This API address will be used if there are no worker servers listed in the cluster package
#[serde(default)]
pub api_lan_address: Option<(String, u16)>,
#[serde(default)]
pub redirect_logs_dir: Option<PathBuf>,
}

Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pub fn configure(config: &rivet_config::Config) -> GlobalResult<String> {
datacenter_id: Uuid::nil(),
server_id: Uuid::nil(),
api_lan_address: None,
intercom_endpoint: Url::parse(&format!("http://127.0.0.1:{TUNNEL_API_EDGE_PORT}"))?,
intercom_address: Url::parse(&format!("http://127.0.0.1:{TUNNEL_API_EDGE_PORT}"))?,
redirect_logs_dir: Some(PathBuf::from("/var/log/rivet-guard")),
}),
status: server_config.rivet.status.clone(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ pub fn configure(config: &rivet_config::Config) -> GlobalResult<String> {
datacenter_id: Uuid::nil(),
server_id: Uuid::nil(),
api_lan_address: None,
intercom_endpoint: Url::parse(&format!("http://127.0.0.1:{TUNNEL_API_EDGE_PORT}"))?,
intercom_address: Url::parse(&format!("http://127.0.0.1:{TUNNEL_API_EDGE_PORT}"))?,
redirect_logs_dir: Some(PathBuf::from("/var/log/rivet-edge-server")),
}),
..Default::default()
Expand Down
3 changes: 0 additions & 3 deletions packages/edge/infra/guard/server/src/routing/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ use service_discovery::ServiceDiscovery;
use url::Url;
use uuid::Uuid;

// TODO: Copied from cluster/src/workflows/server/install/install_scripts/components/rivet/mod.rs
const TUNNEL_API_EDGE_PORT: u16 = 5010;

/// Route requests to the API service
#[tracing::instrument(skip_all)]
pub async fn route_api_request(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ async fn publish_registered(ctx: &ActivityCtx, input: &PublishRegisteredInput) -

let config = Configuration {
client: rivet_pools::reqwest::client().await?,
base_path: util::url::to_string_without_slash(&edge.intercom_endpoint),
base_path: util::url::to_string_without_slash(&edge.intercom_address),
bearer_access_token: Some(token),
..Default::default()
};
Expand Down
Loading