mirror of
https://github.com/faas-rs/faasd-in-rust.git
synced 2025-06-09 00:06:47 +00:00
fix(get_function):fix the logic of get_function in zky's branch
This commit is contained in:
parent
0bbb6759ce
commit
168b533784
@ -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,
|
||||||
|
@ -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>,
|
||||||
|
@ -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) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user