Search in sources :

Example 1 with PluginOkHttpClientProvider

use of com.netflix.spinnaker.kork.plugins.update.internal.PluginOkHttpClientProvider in project kork by spinnaker.

the class Front50PluginsConfiguration method pluginsOkHttpClient.

@Bean
public static PluginOkHttpClientProvider pluginsOkHttpClient(Environment environment) {
    OkHttpClientConfigurationProperties okHttpClientProperties = Binder.get(environment).bind("ok-http-client", Bindable.of(OkHttpClientConfigurationProperties.class)).orElse(new OkHttpClientConfigurationProperties());
    OkHttpClient okHttpClient = new OkHttp3ClientConfiguration(okHttpClientProperties).create().retryOnConnectionFailure(okHttpClientProperties.isRetryOnConnectionFailure()).build();
    return new PluginOkHttpClientProvider(okHttpClient);
}
Also used : OkHttpClient(okhttp3.OkHttpClient) PluginOkHttpClientProvider(com.netflix.spinnaker.kork.plugins.update.internal.PluginOkHttpClientProvider) OkHttpClientConfigurationProperties(com.netflix.spinnaker.okhttp.OkHttpClientConfigurationProperties) Bean(org.springframework.context.annotation.Bean)

Aggregations

PluginOkHttpClientProvider (com.netflix.spinnaker.kork.plugins.update.internal.PluginOkHttpClientProvider)1 OkHttpClientConfigurationProperties (com.netflix.spinnaker.okhttp.OkHttpClientConfigurationProperties)1 OkHttpClient (okhttp3.OkHttpClient)1 Bean (org.springframework.context.annotation.Bean)1