about summary refs log tree commit diff
path: root/users/tazjin/yddns/src/main.rs
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2023-06-14T09·58+0300
committertazjin <tazjin@tvl.su>2023-06-14T10·06+0000
commit3d3890ebcd48b595fffe9605553fa6c4afcaf1a4 (patch)
tree4bf289fadf3c55f292a6b366b7838dfd18df37a9 /users/tazjin/yddns/src/main.rs
parentb3c9619f8cee8c5ae99fa99806165c26e5a3bfa3 (diff)
chore(tazjin/yddns): update yandex-cloud version r/6295
Change-Id: Iaf246014601bf7ab3fb1af4961c2fe26f66e45be
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8770
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'users/tazjin/yddns/src/main.rs')
-rw-r--r--users/tazjin/yddns/src/main.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/users/tazjin/yddns/src/main.rs b/users/tazjin/yddns/src/main.rs
index 5799b59dafa0..2e2f9fe02fe4 100644
--- a/users/tazjin/yddns/src/main.rs
+++ b/users/tazjin/yddns/src/main.rs
@@ -3,9 +3,7 @@ use crimp::Request;
 use std::env;
 use std::net::Ipv4Addr;
 use tokio::runtime;
-use tonic::codegen::InterceptedService;
-use tonic::transport::channel::Channel;
-use tonic::transport::Endpoint;
+use yandex_cloud::tonic_exports::{Channel, Endpoint, InterceptedService};
 use yandex_cloud::yandex::cloud::dns::v1 as dns;
 use yandex_cloud::yandex::cloud::dns::v1::dns_zone_service_client::DnsZoneServiceClient;
 use yandex_cloud::{AuthInterceptor, TokenProvider};
@@ -115,7 +113,8 @@ async fn compare_update_record<T: TokenProvider>(
 }
 
 fn main() -> Result<()> {
-    let token = format!("Bearer {}", env::var("YANDEX_CLOUD_TOKEN")?);
+    let token =
+        env::var("YANDEX_CLOUD_TOKEN").context("Yandex Cloud authentication token unset")?;
     let target_zone_id =
         env::var("TARGET_ZONE").unwrap_or_else(|_| "dnsd0tif5mokfu0mg8i5".to_string());
     let target_record = env::var("TARGET_RECORD").unwrap_or_else(|_| "khtrsk".to_string());