From faa6eafb6020c2bbfbfefdbc39e7c2d1de28e14c Mon Sep 17 00:00:00 2001 From: Naohiro Yoshida Date: Wed, 20 Dec 2023 14:05:12 +0900 Subject: [PATCH] add conn opts (#222) --- pubsub/src/client.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pubsub/src/client.rs b/pubsub/src/client.rs index bba9ae5c..0259df9e 100644 --- a/pubsub/src/client.rs +++ b/pubsub/src/client.rs @@ -24,6 +24,8 @@ pub struct ClientConfig { pub environment: Environment, /// Overriding service endpoint pub endpoint: String, + /// gRPC connection option + pub connection_option: ConnectionOptions, } /// ClientConfigs created by default will prefer to use `PUBSUB_EMULATOR_HOST` @@ -39,6 +41,7 @@ impl Default for ClientConfig { }, project_id: default_project_id, endpoint: PUBSUB.to_string(), + connection_option: ConnectionOptions::default(), } } } @@ -111,7 +114,7 @@ impl Client { pool_size, config.endpoint.as_str(), &config.environment, - &ConnectionOptions::default(), + &config.connection_option, ) .await?, ); @@ -120,7 +123,7 @@ impl Client { pool_size, config.endpoint.as_str(), &config.environment, - &ConnectionOptions::default(), + &config.connection_option, ) .await?, );