Skip to content

Commit

Permalink
add conn opts (#222)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshidan authored Dec 20, 2023
1 parent bc3db12 commit faa6eaf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pubsub/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -39,6 +41,7 @@ impl Default for ClientConfig {
},
project_id: default_project_id,
endpoint: PUBSUB.to_string(),
connection_option: ConnectionOptions::default(),
}
}
}
Expand Down Expand Up @@ -111,7 +114,7 @@ impl Client {
pool_size,
config.endpoint.as_str(),
&config.environment,
&ConnectionOptions::default(),
&config.connection_option,
)
.await?,
);
Expand All @@ -120,7 +123,7 @@ impl Client {
pool_size,
config.endpoint.as_str(),
&config.environment,
&ConnectionOptions::default(),
&config.connection_option,
)
.await?,
);
Expand Down

0 comments on commit faa6eaf

Please sign in to comment.