Skip to content

Commit 648147e

Browse files
committed
fix: change service schema key to target_host
1 parent 3850a5d commit 648147e

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

SERVICES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ To register a service with the gateway to make it available for use from the [Tu
66
```toml
77
[services.name] # where 'name' is a unique kebab-case name for your service
88
path="/myservice" # unique path the frontend will make a request to at /api[path]
9-
target_service="https://my-service.default.svc.cluster.local" # the host for the service
9+
target_host="https://my-service.default.svc.cluster.local" # the host for the service
1010
target_port=8080 # the target port for your service
1111
```
1212
- add an entry for your service in the list below with a brief description of your service and a link to the documentation

src/config.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
use serde::{Deserialize, Serialize};
2+
use std::collections::HashMap;
23
use std::{fs::File, io::Read};
3-
use toml;
44

55
#[derive(Serialize, Deserialize, Debug, Clone)]
66
pub struct ServiceConfig {
77
pub path: String,
8-
pub target_service: String,
8+
pub target_host: String,
99
pub target_port: u32,
1010
}
1111

1212
#[derive(Serialize, Deserialize, Debug, Clone)]
1313
pub struct GatewayConfig {
1414
pub auth_url: String,
15-
pub services: Vec<ServiceConfig>,
15+
pub services: HashMap<String, ServiceConfig>,
1616
}
1717

1818
pub fn load_config(path: &str) -> GatewayConfig {

0 commit comments

Comments
 (0)