introduce CreateWatchHandle for use with HttpClientFactory (#379)

This commit is contained in:
Nicholas Steicke
2020-04-06 13:57:46 +09:30
committed by GitHub
parent 4e1c9bd20c
commit 3164e9234c
2 changed files with 6 additions and 3 deletions

View File

@@ -32,7 +32,8 @@ namespace httpClientFactory
serviceProvider.GetRequiredService<KubernetesClientConfiguration>(),
httpClient);
})
.ConfigurePrimaryHttpMessageHandler(config.CreateDefaultHttpClientHandler);
.ConfigurePrimaryHttpMessageHandler(config.CreateDefaultHttpClientHandler)
.AddHttpMessageHandler(KubernetesClientConfiguration.CreateWatchHandler);
// Add the class that uses the client
services.AddHostedService<PodListHostedService>();