fix(get_function):fix the logic of get_function in zky's branch

This commit is contained in:
dolzhuying 2025-04-14 13:09:10 +08:00 committed by Samuel Dai
parent 0bbb6759ce
commit 168b533784
3 changed files with 4 additions and 5 deletions

View File

@ -75,7 +75,7 @@ pub async fn get_function(
image, image,
pid, pid,
replicas, replicas,
ip, address,
labels, labels,
env_vars, env_vars,
env_process, env_process,

View File

@ -7,7 +7,7 @@ pub struct Function {
pub image: String, pub image: String,
pub pid: u32, pub pid: u32,
pub replicas: i32, pub replicas: i32,
pub ip: String, pub address: String,
pub labels: HashMap<String, String>, pub labels: HashMap<String, String>,
// pub annotations: HashMap<String, String>, // pub annotations: HashMap<String, String>,
// pub secrets: Vec<String>, // pub secrets: Vec<String>,

View File

@ -35,11 +35,10 @@ impl InvokeResolver {
}; };
//容器启动后的port? //容器启动后的port?
let ip = function.ip.clone(); let address = function.address.clone();
println!("function: {:?}", function); println!("function: {:?}", function);
//let port = 80;
let urlstr = format!("http://{}", ip); let urlstr = format!("http://{}", address);
match Url::parse(&urlstr) { match Url::parse(&urlstr) {
Ok(url) => Ok(url), Ok(url) => Ok(url),
Err(e) => { Err(e) => {