Skip to content

Commit 071b8a8

Browse files
authored
---
yaml --- r: 7949 b: refs/heads/tswast-patch-1 c: 78346c3 h: refs/heads/master i: 7947: 978305c
1 parent aa9a1d8 commit 071b8a8

3 files changed

Lines changed: 12 additions & 11 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ refs/tags/v0.18.0: 9d193c4c4b9d1c6f21515dd8e50836b9194ec9bb
5757
refs/tags/v0.19.0: e67b56e4d8dad5f9a7b38c9b2107c23c828f2ed5
5858
refs/tags/v0.20.0: 839f7fb7156535146aa1cb2c5aadd8d375d854e8
5959
refs/tags/v0.20.1: 370471f437f1f4f68a11e068df5cd6bf39edb1fa
60-
refs/heads/tswast-patch-1: 3a039931aaaaf19b128d96ba94107299c2a82749
60+
refs/heads/tswast-patch-1: 78346c3527c36bc4581d124de7a862b06f3d86f4
6161
refs/heads/pubsub-streaming-pull: 19262b752ee874eb2ca3b950eb2aef44d5a5267b

branches/tswast-patch-1/google-cloud-core/src/main/java/com/google/cloud/GrpcTransportOptions.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -210,23 +210,23 @@ public UnaryCallSettings.Builder getApiCallSettings(RetrySettings retrySettings)
210210
}
211211

212212
/**
213-
* Returns a channel provider.
213+
* Returns a channel provider from the given default provider.
214214
*/
215-
public static ChannelProvider getChannelProvider(
216-
ServiceOptions<?, ?> serviceOptions) {
215+
public static ChannelProvider setUpChannelProvider(
216+
InstantiatingChannelProvider.Builder providerBuilder, ServiceOptions<?, ?> serviceOptions) {
217217
HostAndPort hostAndPort = HostAndPort.fromString(serviceOptions.getHost());
218-
InstantiatingChannelProvider.Builder builder = InstantiatingChannelProvider.newBuilder()
219-
.setServiceAddress(hostAndPort.getHostText())
218+
providerBuilder.setServiceAddress(hostAndPort.getHostText())
220219
.setPort(hostAndPort.getPort())
221-
.setClientLibHeader(serviceOptions.getGoogApiClientLibName(),
222-
firstNonNull(serviceOptions.getLibraryVersion(), ""));
220+
.setClientLibHeader(ServiceOptions.getGoogApiClientLibName(),
221+
firstNonNull(ServiceOptions.getLibraryVersion(), ""));
223222
Credentials scopedCredentials = serviceOptions.getScopedCredentials();
224223
if (scopedCredentials != null && scopedCredentials != NoCredentials.getInstance()) {
225-
builder.setCredentialsProvider(FixedCredentialsProvider.create(scopedCredentials));
224+
providerBuilder.setCredentialsProvider(FixedCredentialsProvider.create(scopedCredentials));
226225
}
227-
return builder.build();
226+
return providerBuilder.build();
228227
}
229228

229+
230230
/**
231231
* Returns the timeout for the initial RPC, in milliseconds. Subsequent calls will use this value
232232
* adjusted according to {@link #getTimeoutMultiplier()}. Default value is 20000.

branches/tswast-patch-1/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/GrpcLoggingRpc.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ public GrpcLoggingRpc(LoggingOptions options) throws IOException {
9090
.build();
9191
channelProvider = FixedChannelProvider.create(managedChannel);
9292
} else {
93-
channelProvider = transportOptions.getChannelProvider(options);
93+
channelProvider = GrpcTransportOptions.setUpChannelProvider(
94+
LoggingSettings.defaultChannelProviderBuilder(), options);
9495
}
9596
providerManager = ProviderManager.newBuilder()
9697
.setChannelProvider(channelProvider)

0 commit comments

Comments
 (0)