mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +02:00
Refactor AppEngineConnection
AppEngineConnection can now connect to all services and not just the tools. The default is still the tools. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=218734983
This commit is contained in:
parent
97aa98eb35
commit
b48061b792
31 changed files with 269 additions and 329 deletions
|
@ -20,6 +20,7 @@ import com.google.api.client.http.javanet.NetHttpTransport;
|
|||
import dagger.Binds;
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
import google.registry.config.RegistryConfig;
|
||||
import javax.inject.Named;
|
||||
import javax.inject.Provider;
|
||||
|
||||
|
@ -43,9 +44,8 @@ class DefaultRequestFactoryModule {
|
|||
@Provides
|
||||
@Named("default")
|
||||
public HttpRequestFactory provideHttpRequestFactory(
|
||||
AppEngineConnectionFlags connectionFlags,
|
||||
Provider<Credential> credentialProvider) {
|
||||
if (connectionFlags.getServer().getHost().equals("localhost")) {
|
||||
if (RegistryConfig.areServersLocal()) {
|
||||
return new NetHttpTransport()
|
||||
.createRequestFactory(
|
||||
request -> request
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue