Expose the getOrCreate method via the InternalSharedXdsClientPoolProvider. This is needed for internal users to both set the bootstrap and interact with the XdsClient via the shared object pool (#10872)

This commit is contained in:
Anirudh Ramachandra 2024-02-10 02:20:26 +05:30 committed by GitHub
parent d568a8dc19
commit 52b11c1d08
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -17,6 +17,7 @@
package io.grpc.xds;
import io.grpc.Internal;
import io.grpc.internal.ObjectPool;
import java.util.Map;
/**
@ -30,4 +31,8 @@ public final class InternalSharedXdsClientPoolProvider {
public static void setDefaultProviderBootstrapOverride(Map<String, ?> bootstrap) {
SharedXdsClientPoolProvider.getDefaultProvider().setBootstrapOverride(bootstrap);
}
public static ObjectPool<XdsClient> getOrCreate() throws XdsInitializationException {
return SharedXdsClientPoolProvider.getDefaultProvider().getOrCreate();
}
}