fix: missing token
This commit is contained in:
parent
9f4fb6c274
commit
4e3b561f61
2 changed files with 12 additions and 2 deletions
|
|
@ -1,5 +1,6 @@
|
|||
use std::time::Duration;
|
||||
|
||||
use log::{error, info};
|
||||
use tokio::time::sleep;
|
||||
use tonic::transport::Channel;
|
||||
|
||||
|
|
@ -17,7 +18,11 @@ pub async fn register_service(client: &mut RegistryClient<Channel>, name: &str,
|
|||
token: std::env::var("REGISTRY_TOKEN").unwrap_or_default(),
|
||||
});
|
||||
|
||||
let _ = client.register(req).await;
|
||||
let resp = client.register(req).await;
|
||||
match resp {
|
||||
Ok(r) => info!("{:?}", r),
|
||||
Err(e) => error!("error register: {:?}", e)
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn heartbeat_loop(name: String, url: String) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue