Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add conn opts #222

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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